Vb6 Migration - VB6 Convert To VB Variant?

Dec 2, 2009

I have been tasked to convert out VB6 program to VB.NET. In my research online everyone seems to say I need to go through my code and get rid of any Variants I have. I have had pretty good luck so far, but I am having an issue in replacing this one.

[code]...

I am still pretty new to VB (either 6 or .net) and I am having a hard time finding an alternative for this. Will the convert tool in VB.net handle this just fine? Or do I need to change this? If I do, is there a better alternative for this? Forgive my noobness.

View 2 Replies


ADVERTISEMENT

Migration - Convert The Code?

Apr 26, 2012

I got a chance to work in the migration project(VB to VB.NET).I was confusing in the RecordSet functionality.In our project we are taking the DataReader according to the scenario.But in the Looping cases like dsr.EOF.

Dim recordset As dao.RecordSet
If recordset .EOF Then
' ' msgbox "Please enter some number ", vbOKOnly, "Number Not Found"[code].....

How to convert this into VB.NET?Either we need to write If Not reader.Read or If reader.Read.

View 1 Replies

Data Migration - Data Migration Two Database In MS SQL 2005

Oct 13, 2010

I am doing data migration two database in MS SQL 2005. The records are more than 200000 nearly 300000. I need to query from source database using joins and insert 2 or 3 tables in destination databse. Which way is the best way to do so? I am trying to write a program with VB.NET. If you have sample,

View 1 Replies

How To Pass Variant* To Com In .NET

Jun 10, 2010

Function "SetUserName" is used to download the specified user's name data to the appointed terminal.

[Format]
BOOL SetUserName(
long DeviceKind,
long dwMachineNumber,
long dwEnrollNumber,

[Code]...

View 2 Replies

Is N1 Actually Being Defined As A Variant

Jan 25, 2011

in the line dim n1,n2 as integer...is n1 actually being defined as a variant ?

View 2 Replies

Variant Marshaling To A COM Assembly?

May 18, 2011

I'm having trouble using a COM based DLL in that one of the parameters is of type VARIANT.

The C++ definition of the structure is as follows:

typedef struct CSimData
{
DWORD dwSigId;

[Code].....

From debugging i've been able to determine that the COM server is getting no value in vValue. Is there some sort of Marshaling that needs to be done to be able to set that VARIANT up on my side so that it can use it?

View 1 Replies

C# - Exposing Property As Variant In .NET For Interop?

Feb 28, 2012

I am creating a wrapper class in .NET (VB.NET as it happens but is equally related to C#) that is exposed to COM and one of the properties I am trying to wrap is a Variant. I thought I would just be able to use an Object, but I get an error: Public Property FieldValue([vFieldID As Object = -1]) As Object cannot be exposed to COM as a property 'Let'. You will not be able to assign non-object values (such as numbers or strings) to this property from Visual Basic 6.0 using a 'Let' statement.*

My property declaration looks like this:
Public Property FieldValue(Optional ByVal vFieldID As Object = -1) As Object
Get

[code].....

View 2 Replies

Use Sql To Select A Variant Field From A Table?

Oct 31, 2009

I want to extract a field (field name is variant, i.e. depend on what the user's choice) from a table using sql statement. How do I do that? Do I have to declare some variables?

View 4 Replies

VS 2008 Use From Variant In Form1 In Form2?

Aug 2, 2010

I have a simple problem and I believe that the solution is with module using but I could not resolve it yet. Here is the scene:In Form1 I have a variant that gets its value from the selections of a listbox. The code is:OPtext) in Form2 because this selection from Listbox (in Form 1) should also trigger some events in Form 2. I tried to use a module and declare the variant using Public. I did this and I now can use the variant in Form 2. But the value selected in Form1 does not come to Form 2.

View 7 Replies

Converting From VB6 - Reading Excel Range Into Variant Array

Oct 18, 2011

In VB6 I could assign an Excel range directly to a variant array dim vArr as variant vArr = xlSheet.range("A2:A10").value and then work with vArr to pull out the values I needed. This doesn't work in VB 2010. Is there a replacement procedure to allow me to read in a range (perhaps large) all at once and then process the data without needing Excel?

[Code]...

View 6 Replies

Converting VBA Related To Variant And Array Creation/Initialization Syntax To .Net?

Jun 17, 2011

The following code works fine in VBA Goal of the code is to find (select) all cells in an Excel worksheet where the backgrounf cell color is Yellow (6) or Rose (38)

Sub SelectColorsViaArray()
Dim e As Variant
Dim r As Range
Dim x As Range

[code]....

3) With the above, I still do not understand how to integrate the Variant and Array differences from VB6 to VB.Net. I know what to do with all other like: Application.FindFormat.Interior.ColorIndex ... etc.

View 10 Replies

VS 2005 Variant - Values Coming Back From The Function Is Not Getting Converted To Object Type Properly

Jun 8, 2011

I have some ActiveX that was written for VB6. They all seem to return Variant types. Ex.

[Code]....

In this case the GetPosition control is returning a robot axis position. It looks to me like the values coming back from the function is not getting converted to object type properly.

View 2 Replies

Migration From .NET 4.0 To .NET 3.5

Oct 24, 2011

I have developed an application using .NET 4.0 Framework, now i want to migrate to .NET 3.5 Framework.

When i change the Framework in advance compile option and run the application it gives me the following error. how can i over come this....

View 7 Replies

Migration From Vb6 To .NET?

Jun 22, 2010

I have made the dreaded (but forced) change from vb6 to .NET.

View 1 Replies

Migration Of VB To .net?

Jan 19, 2009

Any program written in Vb 6.0 Is there any free source code available to convert vb code to vb.net?

View 3 Replies

Migration From VB6 To .NET 2008?

Apr 23, 2010

I'm going to convert VB6 code to vb.NET 2008. Please advise me What is the best way to convert the code. My VB6 system used following comp.

View 3 Replies

VB To C#.Net Migration Project?

Oct 22, 2009

I am working on a VB to C#.Net migration project. Has anyone used a tool called CSharpener to convert VB.Net code to C#? What is your experience with this tool? How much code does this tool migrate & how much is the rework?

View 1 Replies

Asp.net - Data Migration In Sql 2005?

Feb 23, 2009

In my Live sql database ,I have to change the date value from (date, month ,year) to date. Now there is 100 records with the date as date,month ,year(3 Fields).iF I change directly to date Field all the datas in the 3 field of those 100 records will automaticly change to a default date and original dates will disappear.What should i do to migrate all my datas safely

View 2 Replies

Calling All VB6, VBA, SQL Migration Experts Out There?

Jul 21, 2009

I'm working on a project trying to migrate data from MS Access to CRM(Sales force) online web services database. Have you any ideas how this process can be done? Also, if you know of any VBA or SQL code or online sites that can help me with coding this migration?

View 2 Replies

Migration From MS Access To SQL 2008 In Vb6.0 With DAO

Mar 10, 2010

I migrate a vb application from MS Access to SQL Server 2008 using DAO Connectivity.[code]My question is this Is there any way to just change connection from mdb to SQL 2008 without changing in code..

View 9 Replies

VB To .NET Copy File Migration?

Apr 26, 2011

I'm migrating VB code to VB.Net and I can not figure out why my files are not copying to there new folder. Here is the old VB code below:

Public Sub FileTransferDoneImage(ByVal FilePath As String)
OnlyFileName = GetFileName 'Get only filename
OnlyPath = GetPathOnly(FilePath) 'Getting only the path

[code]....

The message box shows the correct path/file, but the files are not copying?

View 2 Replies

Vb6 Migration - Porting A .bas File To Vb?

Feb 21, 2011

I'm working on some legacy VB5/VB6 code and need to convert a ".bas" file to vb.net. i found several options

Compile the .bas file into a com dll and then reference and use it in my project. (For this I guess I would need vb5 or vb6 which I don't have at my disposal) Copy and paste the contents of the file in to a new module in vb.net and then try solving the errors one by one.The contents of the .bas file reference a particular dll. The .bas file has mostly declarations consts, types, sub's and functions.

What would be the most elegant way of redoing this in vb.net. Is it as simple as option 2.EDIT

I used VS2008 express and ran the code through the upgrade wizard it did the necessary conversion. and the .bas file was converted to .vb. I took that file and decided to rewrite other parts of the code, including some redoing of the converted .vb file. Other questions related to this one are here.

View 3 Replies

[2005] Migration From Xp To Vista

Jan 20, 2009

I am migrating to win vista from xp, I have an half completed program in XP , so i wanted to know whether i would be able to continue its development in vista or not. and an another question, whether my program which will be developed on vista can run on xp and vice versa?

View 1 Replies

C# - .Net 3.5 To 4 Migration Resulting In Application Slowdown

Feb 17, 2011

As I wanted to benefit from new multicore threading improvements from .Net Framework 4, I recompiled all of my solution projects from 3.5 to 4.Everything compiled Ok. But what was my surprise to see that my application runs much slower when compiled in .Net 4 compared to 3.5. I was not expecting that at all. It is a scientific processing App, so computing time is what it's all about. I have no clue where to start from, and for the time being, and I prefer to think that I have missed something during the migration process, that is fixable, rather than the App is "per se" running slower in .4 (can't see any logical reason for that...)

View 2 Replies

Code Migration Wizard In Program?

Apr 5, 2011

I have come to know that there is a code migration wizard, that heps migrate from vb6 to vb.net.

View 1 Replies

Implementing Interfaces During VB To .NET Class Migration?

Jul 11, 2011

I'm migrating the CenterSnap.cls from its vb version to vb.NET and I'm confused about the following 2 errors after I import the vb6 project to VS 2008.

[Code]...

View 1 Replies

MIgration From Office 2003 To 2007?

Feb 16, 2012

I have a application VB.net which is working fine for office 2003.But one of the user has installed office 2007.I dont have the knowledge of BindingRedirect .

Old references

Interop.Access version 11.0

VBE.Interop version 11.0[code]....

View 12 Replies

Migration Of Test Scripts Into A New Release

Aug 2, 2009

Our company's current system test cycle involves the use of word documents for the UI test scripts and test execution log.For each new release, these documents are copied from the previous release and then modified to reflect the current release version together with new test steps where there are changes in functionality.Firstly, this is time-consuming - editing each word document (around 150 docs) just to make minor changes. Secondly, mistakes may occur as this process is manual.If I were able to port the test scripts into some data store (eg. sql server, xml file), would it be relatively straightforward to generate the word (or rtf, but not pdf) documents (using a word template with custom fields perhaps) based on this data set.

View 2 Replies

Migratordotnet : How To Write A Migration Class With .net

Jul 19, 2011

I got all C# implementations on Google, so I converted it to VB.Net, but I am not able to convert 1 line where it gives error.My Class :

Imports Migrator.Framework[Migration(1)] ' Gives ERROR Here.. How to write this in VB.net ?

Public Class mig_001
Inherits Migration
Public Overrides Sub Up()
Database.AddTable("Planets",
New Column("Id", DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),

[Code]...

View 1 Replies

Vb6 Migration - Library Behaviour While Migrating From VB6 To .NET?

Nov 24, 2010

I have a VB6 application which i need to convert to VB.NET 3.5. The application uses a lot of Business objects libraries and some external libraries.I would like to know if these libraries would behave the same way when i move from VB to VB.net?Are there chances that things would break?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved