String de Conexão SQL Server 2005
SQL Server 2005
.NET Framework Data Provider for SQL Server
Type: .NET Framework Class Library
Usage: System.Data.SqlClient.SqlConnection
Standart Security
Trusted Connection alternative syntax
.NET Framework Data Provider for SQL Server
Type: .NET Framework Class Library
Usage: System.Data.SqlClient.SqlConnection
Standart Security
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Trusted Connection
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Trusted Connection alternative syntax
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Connecting to an SQL Server instance
Connecting to an SQL Server instance
Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
Attach a database file on connect to a local SQL Server Express instance
Attach a database file, located in the data directory, on connect to a local SQL Server Express instance
Using an User Instance on a local SQL Server Express instance
Fonte : connectionstrings.com
Attach a database file on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;
Attach a database file, located in the data directory, on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;
Using an User Instance on a local SQL Server Express instance
Data Source=.\SQLExpress;Integrated Security=true; AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;
Fonte : connectionstrings.com
Comentários
Postar um comentário