.NET Framework Data Provider for SQL Server
Typ: .NET Framework Class Library
Verwendung: System.Data.SqlClient.SqlConnection
Hersteller: Microsoft
Verwendung: System.Data.SqlClient.SqlConnection
Hersteller: Microsoft
Standard Sicherheit
1 |
Server=yourServerAddress;Database=yourDataBase;User Id=yourUsername;Password=yourPassword; |
Trusted Verbindung
1 |
Server=yourServerAddress;Database=yourDataBase;Trusted_Connection=True; |
Verbindung zu einer SQL Server-Instanz
The server/instance name syntax used in the server option is the same for all SQL Server connection strings.
1 |
Server=yourServerName\myInstanceName;Database=yourDataBase;User Id=yourUsername;Password=yourPassword; |
Verbinden über eine IP-Adresse
DBMSSOCN=TCP/IP is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.
1 |
Data Source=aaa.bbb.ccc.ddd,1433;Network Library=DBMSSOCN;Initial Catalog=yourDataBase;User ID=yourUsername;Password=yourPassword; |
Aktiviere MARS
1 |
Server=yourServerAddress;Database=yourDataBase;Trusted_Connection=True;MultipleActiveResultSets=true; |
SQL Server Native Client 11.0 OLE DB Provider
Typ: OLE DB Provider
Verwendung: Provider=SQLNCLI11
Hersteller: Microsoft
Verwendung: Provider=SQLNCLI11
Hersteller: Microsoft
Standard Sicherheit
Are you using SQL Server 2012 Express? Don’t miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2012 Express installation resides.
1 |
Provider=SQLNCLI11;Server=yourServerAddress;Database=yourDataBase;Uid=yourUsername;Pwd=yourPassword; |