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