ODBC Driver for SQL Server

Connection String Options - SQL Server ODBC Driver

SQL Server Connection Options

The following table describes the options that you can include in the connection string for SQL Server:

Option Description

Server

Serves to supply the server name for login.

Port

Used to specify the port number for the connection. 1433 by default.

Username

Used to supply a user name for login.

Password

Used to supply a password for login.

Database

Used to set the name of the database

ConnectionTimeout

Used to specify the time in seconds before an attempt to make a connection is considered unsuccessful.

IPVersion

Used to specify the version of the Internet Protocol. IPv4 and IPv6 are available. The IPv4 + IPv6 value allows to check for available protocol versions and use the first available automatically.

Advanced Settings

Option Description

Empty strings as NULL

To retrieve metadata, not all parameters according to MSDN can accept a null value. If NULL, the driver should return an error. But some 3rd-party tools pass NULL to the parameters. These options should be enabled for compatibility with such tools.

Allow NULL strings

String Types

Sets the string value types returned by the driver as Default, Ansi or Unicode.

  • Default - the driver defines the string types.
  • Ansi - all string types will be returned as SQL_CHAR, SQL_VARCHAR and SLQ_LONGVARCHAR.
  • Unicode - all string types will be returned as SQL_WCHAR, SQL_WVARCHAR and SLQ_WLONGVARCHAR.

The option value should be changed if any third-party tool supports only Ansi string types or Unicode ones.

RegionalNumberSettings

Enables using local regional settings when converting numbers to string.

RegionalDateTimeSettings

Enables using local regional settings when converting dates and times to string.

SQL Server ODBC Connection String sample

DRIVER={Devart ODBC Driver for SQL Server};Data Source=DBMSSQL;User ID=sa;Port=1433

© 2015-2018 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback