O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The System.Data.SqlClient and System.Data.OleDb Namespaces

As previously mentioned, the System.Data.SqlClient and System.Data.OleDb namespaces work with data sources. System.Data.SqlClient uses a managed provider to interact directly with Microsoft SQL Server version 7.0 and higher. System.Data.OleDb interacts with any valid OLE DB source. Though the namespaces are separate, the base objects function in nearly the same exact manner. Both namespaces contain Connection, Command, DataAdapter, and DataReader objects. Indeed, the namespaces almost exactly mirror one another.

The Connection Object

As you might have guessed, the connection object opens a connection to your data source. All of the configurable aspects of a database connection are represented ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required