SQL Server ODBC connection string

·1 min read·paskov

Use one of the following ODBC connection strings, depending on how you authenticate with SQL Server.

SQL Server authentication (username and password):

Driver={SQL Server};Server=Computer\Server;Database=DatabaseName;Uid=user;Pwd=password;

Windows authentication (trusted connection):

Driver={SQL Server};Server=Computer\Server;Database=DatabaseName;Trusted_Connection=yes;

Replace Computer\Server with your SQL Server host and instance name, and DatabaseName with the database you want to use. For SQL Server authentication, also replace user and password with your login credentials.