Database Reference
In-Depth Information
Table 10-2. Commonly Used SqlClient Classes
Classes
Description
SqlCommand
Executes SQL queries, statements, or stored procedures
SqlConnection
Represents a connection to a SQL Server database
SqlDataAdapter
Represents a bridge between a data set and a data source
SqlDataReader
Provides a forward-only, read-only data stream of the results
SqlError
Holds information on SQL Server errors and warnings
SqlException
Defines the exception thrown on a SQL Server error or warning
SqlParameter
Represents a command parameter
SqlTransaction
Represents a SQL Server transaction
Another namespace, System.Data.SqlTypes , maps SQL Server data types to .NET types, both
enhancing performance and making developers' lives a lot easier.
Understanding the OLE DB Data Provider
Outside .NET, OLE DB is still Microsoft's high-performance data access technology. The OLE DB data
provider has been around for many years. If you've programmed for Microsoft Access in the past, you
may recall using Microsoft Jet OleDb 3.5 or 4.0 to connect with the Microsoft Access database. You can
use this data provider to access data stored in any format, so even in ADO.NET it plays an important role
in accessing data sources that don't have their own ADO.NET data providers.
The .NET Framework data provider for OLE DB is in the namespace System.Data.OleDb . Table 10-3
describes some important classes in the OleDb namespace.
Table 10-3. Commonly Used OleDb Classes
Classes
Description
OleDbCommand
Executes SQL queries, statements, or stored procedures
OleDbConnection Represents a connection to an OLE DB data source
OleDbDataAdapter Represents a bridge between a data set and a data source
OleDbDataReader Provides a forward-only, read-only data stream of rows from a data source
OleDbError
Holds information on errors and warnings returned by the data source
 
Search WWH ::




Custom Search