Book Excerpt

Migrating from ADO to ADO.NET

About the chapter

One of Microsoft's objectives for VS 2005 is to minimize the trauma that developers experience when moving from VB6 and VBA to the .NET Framework 2.0 and VB 2005. Whether VS .NET 2005's VB-specific My namespace and its accouterments will increase the rate of VB6 developer migration to VB 2005 remains to be seen. What's needed to bring professional VB6 database developers to the third iteration of the .NET Framework and Visual Studio's .NET implementation is increased programming productivity, application or component scalability and performance, and code reusability.

Excerpted from the Wiley book Expert One-on-one Visual Basic 2005 Database Programming by Roger Jennings, this chapter begins by demonstrating the similarities of VB6 and VBA code to create ADODB objects and VB 2005 code to generate basic ADO.NET 2.0 objects -- database connections, commands, and read-only resultsets for Windows form projects. Native ADO.NET data provider classes -- especially SqlClient for SQL Server—provide substantially better data access performance than ADODB and its OLE DB data providers. The remaining sections show you multiple approaches for creating ADO.NET DataSets by using new VS 2005 features and wizards to generate the underlying read-write data objects for you automatically. DataSets demonstrate VS 2005's improved data access programming productivity and ADO.NET 2.0's contribution to application scalability.

Navigate this chapter

About the book

This book covers ADO.NET 2.0 basics, designing and programming smart clients with typed DataSets as their data sources, and how to use DataSource, GridView and DetailsView Web controls. Finally, it demonstrates how to take advantage of the new T-SQL extensions, in-process Web services and notifications. Purchase "Expert One-on-one Visual Basic 2005 Database Programming" here.


Chapter 1 is an introduction to ADO.NET 2.0 for Visual Basic 6 developers who've decided to bite the bullet and move to Microsoft .NET Framework 2.0, Visual Studio 2005 (VS 2005) or Visual Basic Express (VBX), and Visual Basic 2005 (VB 2005) as their programming language. The ADO.NET 2.0 code examples and sample projects described in the chapter have the following prerequisites:

  • Experience with VB6 database programming, using the Data Environment Designer, and writing code to create and manipulate ADODB Connection, Command, and Recordset objects, including disconnected Recordsets and databound controls.
  • A basic understanding of the organization and use of .NET Framework namespaces and classes.
  • Sufficient familiarity with using the VS 2005 IDE and writing VB 2005 code to create simple Windows Form projects.
  • Microsoft SQL Server 2000 or 2005 Developer edition or higher, MSDE 2000, or SQL Server Express (SQLX) installed on your development computer or accessible from a network location. Access 2000 or later for Jet 4.0 examples is optional.
  • The Northwind sample database installed on an accessible SQL Server instance.
  • A working knowledge of XML document standards, including some familiarity with XML schemas.

This was first published in May 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: