views:

478

answers:

8

I have some friends who are 'old-school' VB6 database developers and I was telling them about .NET and its features, specifically ADO.NET.

In our conversation, they brought up the following reasons why they would rather stick with ADO than move to ADO.NET:

  • The Dataset is disconnected (What if power fails?)
  • The same amount of code still has to be written
  • The new options of Dataset, BindingSource and TableAdapter seem confusing
  • the same code is written programatically access the Database, all that changes is how that command is laid out

I'm looking for answers or reasons why ADO.NET is 'better' than ADO with regards to data access when it comes to Windows Forms applications. What does ADO.NET provide that ADO does not? What does it do better than ADO?

NB: I'd like examples that do not involve LINQ.

+2  A: 

Simple answer: don't convince them...

Have them look at LINQ to SQL (or better yet LINQ to Entities)

Janie
or better yet, NHibernate.
David P
Maybe MS will port Linq to VB6
n8wrl
I think any of our recommendations beat VB + ADO lol ;)
Janie
lol n8wrl!!!!!!
Janie
+10  A: 

On the one hand, if it ain't broke, don't fix it. But on the other - VB6? Really? Sounds like ADO vs. ADO.NET is small potatoes here...

I think the issue is more VB vs. VB.NET and then the whole code-base, skill-set, other-non-technical-considerations come into play here.

n8wrl
i liked your point here. Can you point me some good reads for a better understanding?
Anirudh Goel
Oh my, this is huge. Why are there still COBOL programs around? Because the company can't justify rewriting it: It works, the original devs are long gone, etc. etc. Some googling should turn up lots of hits on rewrites, migration, etc.
n8wrl
MarkJ
Code base is a non-technical consideration? Can you explain that please?
MarkJ
@MarkJ: Code-base is a strategic asset. Companies have a lot invested in it and there's more than just the technical considerations to abandon it.
n8wrl
MarkJ
+6  A: 

ADO is unsupported COM-based technology. VB 6.0 is end of life unsupported technology as of March 2008. DAO, RDO, ADO are all technologies that are nearly a decade past their prime.

ADO.NET is a modern toolset for data access. In particular, LINQ to SQL and the Entity Framework take data access to new heights.

Nissan Fan
Actually the VB6 runtime *is* still supported on Windows 7 and 2008 server. http://msdn.microsoft.com/en-us/vbrun/ms788708.aspx
MarkJ
ARRRRGH, when will this fu**ing thing dieee!!!!!111
Janie
linq was released with .net 3.5 so ado.net wasn't any where till then?
Anirudh Goel
entity framework came in with3.5 SP1!!
Anirudh Goel
LINQ to SQL and Entity Framework did come later on yes, but ADO.NET all along has been a more dynamic, lightweight-flat API, higher performance, more remoteable API.
Nissan Fan
Its supported, but its end of life. Meaning, they put it on there, but if it doesn't work right its your problem
Steve
@Steve, you're wrong. It is supported. If it doesn't work right you can contact Microsoft tech support and they'll get it fixed. End of life (which will surely come one day) will mean if it doesn't work right, you contact Microsoft and they hang up on you.
MarkJ
ADO will probably still be in Windows when all of .Net has long blown over, as will COM in general. I get the idea people are mistaking a virtualization layer (.Net Framework, Java JVM, etc.) for the underlying OS (kernel, Win32, COM). ADO.Net does offer some advantages though, as others have described.
Bob Riemersma
+1  A: 

One of the biggest issues that was able to get people to switch to ADO.NET at my day job was the fact that ADO (VB6 flavor) is all COM, you get better performance with ADO.NET.

Mitchel Sellers
+4  A: 

There's nothing wrong with using ADO in legacy VB6 applications. And if these applications are functioning correctly there's no reason to change them.

I don't think anyone programming in .Net will be too tempted to try to use ADO since it feels like such a hack job when you try to. Just let them be.

Spencer Ruport
you are answering what i want to hear, Tell me a scenario comparing the solution in both VB and VB.NET which uses ADO / ADO.NET and apart from performance how else is it different?
Anirudh Goel
There are really no stark differences aside from performance. They both allow you to return data from a SQL database using SQL queries. Functionally they're the same exact thing. http://msdn.microsoft.com/en-us/library/904fck4k(VS.71).aspx
Spencer Ruport
A: 

I heard a rumor that the VB6 runtime will not ship after Windows 7...

Chuck Conway
Fat chance of that. Do you know how many VB apps there are out there that would suddenly stop working? Look at it from MS's point of view, if a user was running a legacy VB6 app fine on XP and it breaks when they upgrade Windows, who do they blame?
JohnFx
I'm sure they don't *want* to ship it after Windows 7, but since they haven't provided a decent migration route to get VB6 apps to VB.NET, they might have to keep shipping it.
MarkJ
Seriously, when do you move on? MS's end of life for VB6 was March 2008. The last release of VB6 was 1998. Windows 7 will be around for the next 3 to 4 years. Windows 8 will enter the scene sometime in the next 3 to 4 years. Give a year or so for Windows 8 adoption. So in 15 to 16 years if people haven't moved on, it's either an application that has value and should be ported or it's going to be an application that simply won't work. Whatever the case MS shouldn't have to support VB6. That would be like MS supporting Windows 98, 15 years after it's release. That's just nuts.
Chuck Conway
**Microsoft's decisions** have made it **expensive** to port VB6 applications. Some of their biggest customers have a lot of money invested in VB6 applications. They don't want to spend more money porting these working applications just to help Microsoft. Therefore Microsoft have been forced to continue support for the VB6 runtime. They've done it to themselves. Personally I'd like to see Microsoft buy up the third-party companies who have written decent VB6 migration tools and make them free.
MarkJ
A: 

I'm guessing if the recordset is still connected and the power goes out on the server, the user would get prompted immediately in their app before they continue to enter data that won't get saved?

How about memory garbage collection?

Distributing updates is easier in .net.

I guess if you have a lot of code in VB 6 for winform apps why change? Maybe if you start a new project using VB.NET you can show some other benefits like including multiple tables in a table adapter (Can't say I've taken advantage of that).

Jeff O
A: 

I prefer ADO.NET myself, but just for balance, there is one advantage of classic ADO over ADO.NET: it is arguably more usable.

Our customers found it difficult to use [ADO.NET] because of the extensive initialisation it requires. Even in the simplest scenarios, users are expected to understand complex interactions and dependencies between several types... Note that many of these problems were addressed in the .NET framework 2.0.

Written by the architects of the .NET framework, in the .NET Framework Design Guidelines 2nd Edition page 25.

MarkJ