1Standard Security
2Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
3
4Trusted Connection
5Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
6
7Connection to a SQL Server instance
8The server/instance name syntax used in the server option is the same for all SQL Server connection strings.
9Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
10
11Using a non-standard port
12If your SQL Server listens on a non-default port you can specify that using the servername,xxxx syntax (note the comma, it's not a colon).
13Server=myServerName,myPortNumber;Database=myDataBase;User Id=myUsername;Password=myPassword;
14The default SQL Server port is 1433 and there is no need to specify that in the connection string.