Connection strings for SQL Server 2008
Providers for SQL Server 2008
» .NET Framework Data Provider for SQL Server (SqlConnection)
» SQL Server Native Client 10.0 OLE DB Provider
» .NET Framework Data Provider for OLE DB (OleDbConnection)
» SQL Server Native Client 10.0 ODBC Driver
» .NET Framework Data Provider for ODBC (OdbcConnection)
» SQLXML 4.0 OLEDB Provider
» Context Connection
Community Forums
Find solutions and post questions regarding connection string related issues.
.NET Framework Data Provider for SQL Server
Type: .NET Framework Class Library
Usage: System.Data.SqlClient.SqlConnection
Manufacturer: Microsoft
More info about this class library »
Customize string
example values »
Standard Security
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.
Are you using SQL Server 2008 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server Express installation resides.
Standard Security alternative syntax
This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.