Team-Fly |
ADO.NET Programming in Visual Basic .NET By Steve Holzner, Bob Howell | |
Table of Contents | |
The first step in working with a database in ADO .NET is to connect to the database using either the SQL Client or the OleDb Client classes and an OLE DB provider. This chapter is all about how you make that connection. As stated previously, there are two Connection classes, one for the SQL Client and one for the OleDb Client. Each class has roughly parallel sets of properties, methods , and events. The OleDbConnection class is slightly more interesting than the SqlConnection class because it supports more database providers. The SqlConnection class is SQL Server-specific, and because of this, many provider-specific settings are built into it. We will discuss both providers together, and where there are differences I will note them. There is a third set of classes for connecting using ODBC data sources. [1] These must be downloaded separately from Microsoft and are not part of Visual Studio. The ODBC classes are useful for connecting to older versions of databases not supported by OLEDB and also many of the older ISAM style databases such as dBase and Paradox.
|
Team-Fly |
Top |