ODBC Driver for SQL Azure

Connection String Parameters - ODBC Driver for SQL Azure

SQL Azure ODBC Connection Parameters

The following table lists the connection string parameters for SQL Azure.

Parameter Description

Server

Serves to supply the server name for login.

Port

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

User ID

Used to supply a unique User ID for login.

Password

Used to supply a password for login.

Database

Used to set the name of the database

Advanced Settings

AllowNullStringsInMetadata

Some parameters don't accept null values when retrieving metadata. If a third-party tool passes a null value to such a parameter, the driver returns an error. These options ensure compatibility with such third-party tools.

EmptyStringsAsNullInMetadata

ApplicationIntent

Used to specify the application workload type when connecting to a server.

ApplicationName

The name of a client application. The default value is the name of the executable file of your application.

AutoTranslate

Used to translate character strings sent between the client and server by converting through Unicode.

Connection Timeout

The time (in seconds) to wait for a connection to open before terminating an attempt. The default value is 15.

Http Trust Server Certificate

This parameter specifies whether or not the driver should trust the server certificate when connecting to the server. The default value is False – the driver won't trust the server certificate and will verify validity of the server certificate instead. If set to True, the driver will trust the server certificate.

IP Version The Internet Protocol Version.
ivIPv4
The default value. Internet Protocol Version 4 (IPv4) is used.
ivIPv6
Internet Protocol Version 6 (IPv6) is used.
ivIPBoth
Either Internet Protocol Version 6 (IPv6) or Version 4 (IPv4) is used.

When set to ivIPBoth, a connection attempt is made via IPv6 if it is enabled in the operating system. If the connection attempt fails, a new connection attempt is made via IPv4.

MultipleActiveResultSets

Enables support for the Multiple Active Result Sets (MARS) technology.

MultipleConnections

Enables or disables the creation of additional connections to support concurrent sessions, commands and rowset objects.

ODBC Behavior Sets the behavior corresponding to the ODBC specification version expected by a third-party tool. The behavior of the ODBC driver can be changed by calling the SQLSetEnvAttr function to set the SQL_ATTR_ODBC_VERSION environment attribute. Some third-party tools expect the driver to exhibit ODBC 2.x behavior, but forget to call SQLSetEnvAttr with the needed version, or pass an incorrect value. In this case, the behavior can be explicitly set in the connection string.
0
The default value. ODBC behavior is determined by a third-party tool.
2
ODBC 2.x behavior is explicitly set.
3
ODBC 3.x behavior is explicitly set.

PacketSize

Used to specify the network packet size in bytes. The value of the packet size property must be between 512 and 32767. The default network packet size in SQL Azure is 4096.

RegionalNumberSettings

Enables the use of local regional settings when converting numbers to strings.

RegionalDateTimeSettings

Enables the use of local regional settings when converting dates and times to 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 are returned as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR.
Unicode
All string types are returned as SQL_WCHAR, SQL_WVARCHAR, and SQL_WLONGVARCHAR.
Note: Set the parameter to Ansi or Unicode if your third-party tool supports only ANSI or Unicode strings.

Sample SQL Azure ODBC Connection String

DRIVER={Devart ODBC Driver for SQL Azure};Server=TCP:azureserver.database.windows.net;Port=1433;Database=myDataBase;User ID=myUsername;Password=myPassword

See also:

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