Appendix A. ADO.NET 2.0
ADO.NET is a set of classes that gives .NET applications access to relational, XML, and application data. The classes let you connect to data sources such as SQL Server and Oracle, as well as to data sources exposed through OLE DB and ODBC, and XML data. After you connect to these data sources, the ADO.NET classes let you retrieve, manipulate, and update data.
This appendix describes the new functionality, support, and features in ADO.NET 2.0.
Data Provider Enumeration and Factories
Data providers in ADO.NET 1.0 and 1.1 are a set of provider-specific classes that implemented generic interfaces. These interfaces can be used to write code that is data provider independent. For example, the data connection classes in the Microsoft SQL Server data provider (SqlConnection
) and the Microsoft Oracle data provider (OracleConnection
) both implement the IDbConnection
interface. Code based on the IDbConnection
interface that is common to both classes, rather than a database-specific instance of a data provider, is independent of the data provider and therefore not dependent on the underlying database. The disadvantage of the interface approach is that you cannot use the interface to access any database-specific features implemented as members of the data provider class but not defined as part of the interface—the ChangeDatabase( )
method of the Oracle data provider, for example.
ADO.NET 2.0 introduces the Common Model, based on the Factory design pattern, which uses a single ...
Get Programming SQL Server 2005 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.