9.5. ADO Connections, Commands, and Transactions

Connected access and simple statement execution consists of using Connections and Commands. Local transactions are supported by using methods of the Connection class. As opposed to OLE DB, in ADO (classic) Connections and Commands are creatable classes. Let's go over the parallel of this usage in ADO.NET.

9.5.1. Connections and Connection Strings

You establish connections in ADO by instantiating a Connection and using a connection string to point to the data source. Because the ADO Connection is a generic object, the specific provider is specified as part of the connection string. In ADO.NET, you instantiate a strongly typed provider class, such as SqlConnection or OleDbConnection. Because the ...

Get Essential ADO.NET 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.