Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating from vb6 to .net

Status
Not open for further replies.

goodmans

MIS
Apr 23, 2008
63
GB
Hi VB Gurus,

I have few applications that where developed in VB 6. its pretty old code which i have developed long back.

We have a public module where we have code like this.

Cn as rdoConnection
Public Sub Main()
Set Cn=en.openconnection(...)
cn.open()
End Sub

We used the RDO library for connections. I guess i need to move on to ADO library for .net. but dont know how i can create a global connection at the begining and use the same connection for all datasets that are used in multiple forms in the whole project.

Now I am trying to migrate this code into .net.
and when i upgraded the project using VS2003 it generated lots of errors and Connection is one of it.
Please help me sort out this problem as this is heart of the project.

Its been long since i used VS.net, honestly saying i dont know anything about it.

Regards
G

 
The answer depends on where you ask the question.

Going into this forum and asking the question is a little like going to Fans of Team A and asking if them if you ought to go hang out with Fans of Team B.

If the people here were really such Visual Fred fans they'd be over there in Fredland. Go over there into the Anders' Fanboys camp ask the same question and the answers would trend a lot more positively for a move.


Such a question just steps on toes so it isn't all that appropriate. But the answer really depends on what sorts of things you are doing. There are many points in favor of moving to Visual Fred (the so-called "Visual Basic" .Net). However there are also a number of things it can be really poor at, mostly due to its gigantic footprint and the balky nature of garbage collected memory management. For the average person the answer should probably be "Yes, move to .Net ASAP."

But wow, if you are using RDO in 2012 that's a bit scary. That's ancient VB5 tech, and began being phased out in 1998. Over in .Netland they normally don't use ADO which is foreign to .Net but instead use ADO.Net, quite a different beast.


If you have large scale legacy VB6 code you may be far better off just to clean up the existing code and move it forward from any legacy VB5 techniques. Then if things get truly desperate down the road you can do a rewrite more easily. There has never been a clean path for VB to VFred conversion, so you might as well consider a conversion to C#, Java, or almost anything else. "Visual Basic .Net" is not even close to actual VB. The similarities are deceiving.
 
Ooops sorry.

This code was developed in 2001, I have never touched it since then. I know RDO is pretty old, we know in 2001 it self we thought of moving to ADO. I definitely want to move to new connectivity libraries (ADOs).

Now just wanted to start working on it. But to be honest say I like VB6. But the only problem is I dont have few ocx components like skins and editable grids, so looking for something which has such components and heard that these are all available in VS.Net latest versions so thought of moving to it.

But as you said. i might better clean the existing VB code and move on to somethng like C# or something like that.

Thanks
G
 
I wouldn't say VB.Net isn't a viable choice, just don't assume there is an easy path to convert a large VB6 program to it.
 
I know a lot of people were very frustrated when Microsoft stopped development of the VB product line, pulled the bait-and-switch of substituting VB.Net, and then gave them the big kiss-off.

If you want to stick with Microsoft tools you're pretty much limited to C# or VB.Net unless you can afford the low-level choice of C++.

Some moved to Delphi, which worked well for many of them and put others out of business. Some moved to Java, which gave them OS portability. A handful tried RealBASIC and you don't hear much from them.

A few moved to C++ though that's not an option for most people. It can have a steep learning curve for serious develoment and it takes a lot more lines of code to do the same job unless you are just writing low-level DLLs and such.

Quite a few changed their focus to web development which opens a large set of options.
 
>a lot of people were very frustrated when Microsoft stopped development of the VB product line

fx: raises hand
 
It's amazing, by now we'd be up to VB10 looking forward to VB11. In that parallel universe they probably have:
[ul]
[li]Flying cars[/li]
[li]Universal health, peace, and prosperity[/li]
[li]Extra-planetary colonies and interstellar exploration[/li]
[li]Junior membership in the Galactic Benificence Coalition[/li]
[/ul]
And who knows what else? [thumbsup2]
 
>we'd be up to VB10 looking forward to VB11
Funny thing with MS and version numbers, they seem to have trouble getting a product past v6/ v7 without a radical change or just plain dumping it;
DOS v6.?
Basic for DOS/ Basiv PDS v7.1
Visusl Basic for Windows v6.0
Windows as we have known it v6.1
I hav'nt been counting the VB.Nets but we must be getting close now, or is it past it already.
 
As a marketing scam to suck in VB programmers they labeled Fred 1.0 as VB 7.0, but this has only resulted in mass confusion in both camps and much loss of good will.

The VFP camp suffered much the same fate, though more willingly since VFP had been moribund for years and itself had turned to parasitizing VB controls. As the early .Net story was told most VB insiders were pushed aside and many VFP folks ended up having their say about Fred features during development. With an axe to grind and no love for VB in the first place they didn't help matters a bit.

Anders himself was a dog in the manger. He hated VB with a passion. For years he groused as VB stole market share from his DOS Turbo Pascal and he positioned his answer Delphi as "The VB Killer." Much of the vitriol in the TP/Delphi camp stems from his attitudes passed through marketing surrogates in those early years.


But that's all water under the bridge. How Microsoft Lost the API War was probably the last important writeup of the destruction wrought.


I think if you check you'll find Windows 8 is Win NT 6.2 under the hood.
 
Have a look at This Page. It has (among other things) a document describing what you need to think about in such a conversion. It's surprisingly balanced given that MS is usually gung-ho about how wonderful .NET is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top