SQL Server 2008 connection strings

.NET Framework Data Provider for SQL Server

Problems connecting?
Get answer in the SQL Server 2008 Q & A forum

SQL Server Native Client 10.0 OLE DB Provider

SQLXML 4.0 OLEDB Provider

.NET Framework Data Provider for OLE DB

  • Use an OLE DB provider from .NET

    Provider=any oledb provider's name;OledbKey1=someValue;OledbKey2=someValue;

    See the respective OLEDB provider's connection strings options. The .net OleDbConnection will just pass on the connection string to the specified OLEDB provider. Read more here.

SQL Server Native Client 10.0 ODBC Driver

.NET Framework Data Provider for ODBC

  • Use an ODBC driver from .NET

    Driver={any odbc driver's name};OdbcKey1=someValue;OdbcKey2=someValue;

    See the respective ODBC driver's connection strings options. The .net OdbcConnection will just pass on the connection string to the specified ODBC driver. Read more here.

Context Connection

  • Context Connection

    Connecting to "self" from within your CLR stored prodedure/function. The context connection lets you execute Transact-SQL statements in the same context (connection) that your code was invoked in the first place.

     using(SqlConnection connection = new SqlConnection("context connection=true"))
         // Use the connection

     Using connection as new SqlConnection("context connection=true")
         ' Use the connection
     End Using


Q&Aask question »

Articlesread all »


Articlesread all »

Didn't find your connection string?

Start over from the connection string reference index - or try a search!

In the Q&A forums you can ask your own question and let somebody help you.

The knowledge articles contains solutions and guides.