Migrating from ADO to ADO.NET

| No TrackBacks

On the public newsgroups today, in response to a Visual Basic 6.0 (VB6) developer trying to morph an application to VB.NET (for an AS400) I responded:

George... you're going through the same issues millions of VB6 developers have faced over the years since VB.NET and ADO.NET were introduced.

First,consider that while ADO and ADO.NET seem to spelled in similar ways, they are no more alike than bicycles and motorcycles. ADO defaults to server-side cursors or Recordset objects that must be traversed using the MOVE methods. ADO.NET does not implement server-side cursors (at all) but focuses on client-side in-memory DataTable objects which are (essentially) flat arrays of rows. You’re opening a DataReader which is essentially a streaming pipe to the data which can return rows to your application. And no, you don't need to process the rows yourself, you can use the DataTable.Load method to quickly populate a DataTable with the rowset. AFA updating, now that you've waited several versions, you'll discover that Visual Studio can generate a TableAdapter class that can handle the updating for you.

I've written several books since VB6 was unceremoniously dropped by Microsoft--books specifically written for developers like you that wanted to transition to ADO.NET. The first of these is "ADO and ADO.NET Examples and Best Practices". While dated, it's designed to help VB6 developers transition to ADO.NET. My latest, "Hitchhiker's Guide to Visual Studio and SQL Server" might also help (even though it focuses on SQL Server) as it discusses the VS 2005 TableAdapter and the techniques exposed by Visual Studio.

I hope this helps.

No TrackBacks

TrackBack URL: http://betav.com/blogadmin/mt-tb.cgi/2311

Pages

Powered by Movable Type 4.21-en

About this Entry

This page contains a single entry by William Vaughn published on October 29, 2008 11:10 AM.

DevTeach Montreal: Come to my SQL Server Applications Workshop was the previous entry in this blog.

Stuff I Learned Today... is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.