Why switch from ADO to ADO.NET?

青春壹個敷衍的年華 提交于 2019-12-05 12:02:17

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.

Keith Adler

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.

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.

Simple answer: don't convince them...

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

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.

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

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!