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.
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.
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,
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?
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
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?
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.
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?
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.
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.
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?
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
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?
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..
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?
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.
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?
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...)
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.
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 .
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.
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),
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?