Connecting to a Data Source Using ADO.NET
In ADO.NET you use a Connection object to connect to a specific data source. To connect to Microsoft SQL Server version 7.0 or later, use the SqlConnection object of the .NET Framework Data Provider for SQL Server. To connect to an OLE DB data source, or to Microsoft SQL Server version 6.x or earlier using the OLE DB Provider for SQL Server (SQLOLEDB), use the OleDbConnection object of the .NET Framework Data Provider for OLE DB. To connect to an ODBC data source, use the OdbcConnection object of the .NET Framework Data Provider for ODBC. To connect to an Oracle data source, use the OracleConnection object of the .NET Framework Data Provider for Oracle.
In This Section
- Connecting to SQL Server Using ADO.NET
Describes how to connect to a SQL Server database using a SqlConnection. - Connection Pooling for the .NET Framework Data Provider for SQL Server
Describes how the .NET Framework Data Provider for SQL Server pools database connections and how you can control the connection pooling behavior. - Connecting to an OLE DB Data Source Using ADO.NET
Describes how to connect to an OLE DB data source using an OleDbConnection. - Connection Pooling for the .NET Framework Data Provider for OLE DB
Describes how the .NET Framework Data Provider for OLE DB pools database connections and how you can control the connection pooling behavior. - Connecting to an ODBC Data Source Using ADO.NET
Describes how to connect to an ODBC data source using an OdbcConnection. - Connection Pooling for the .NET Framework Data Provider for ODBC
Describes how the .NET Framework Data Provider for ODBC pools database connections and how you can control the connection pooling behavior. - Connecting to an Oracle Data Source Using ADO.NET
Describes how to connect to an Oracle data source using an OracleConnection. - Connection Pooling for the .NET Framework Data Provider for Oracle
Describes how the .NET Framework Data Provider for Oracle pools database connections and how you can control the connection pooling behavior. - Working with Connection Events
Describes how to use the InfoMessage event to retrieve informational messages from a data source.
Related Sections
- Using .NET Framework Data Providers to Access Data
Describes the components of the .NET Framework data provider and how it can be used to query and update data from a data source. Includes examples using the .NET Framework Data Provider for SQL Server and the .NET Framework Data Provider for OLE DB. - SqlConnection Class
Provides reference material on the SqlConnection object. - OleDbConnection Class
Provides reference material on the OleDbConnection object. - OdbcConnection Class
Provides reference material on the OdbcConnection object.