ODBC Driver for SAP Sybase Adaptive Server Enterprise

Connection String Parameters - ODBC Driver for SAP ASE

SAP ODBC Connection String Parameters

The following table lists the connection string parameters for SAP Sybase Adaptive Server Enterprise.

Parameter Description

Server

Serves to supply the server name for login.

Port

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

Database

Used to set the name of the database

User ID

Used to supply a unique User ID for login.

Password

Used to supply a password for login.

Advanced Settings

AllowFixedTypes

Adaptive Server Enterprise cannot distinguish SQL_CHAR from SQL_VARCHAR, SQL_WCHAR from SQL_WVARCHAR, and SQL_BINARY from SQL_VARBINARY when preparing an SQL statement. This may break compatibility with some third-party tools. To prevent compatibility issues, the driver always returns SQL_VARCHAR instead of SQL_CHAR, SQL_WVARCHAR instead of SQL_WCHAR, and SQL_VARBINARY instead of SQL_BINARY in metadata. If you want to change this behavior and return fixed data types in metadata, set the parameter to True.

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. By default, these options are enabled for compatibility with such third-party tools.

EmptyStringsAsNullInMetadata

ConnectionTimeout

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

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.
Note: 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.

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.

QuotedIdentifier

To avoid conflicts in procedures and queries that contain reserved words, you should use the QuotedIdentifier parameter. The QuotedIdentifier parameter tells Adaptive Server to consider any character string enclosed in double quotes as an identifier. If this parameter is disabled (by default), ASE considers everything inside the double quotes as a simple string.

RegionalDateTimeSettings

Enables the use of local regional settings when converting dates and times to strings.

RegionalNumberSettings

Enables the use of local regional settings when converting numbers 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 ASE ODBC Connection String

DRIVER={Devart ODBC Driver for ASE};User ID=sa;Server=ASEserver;Data Source=master;Port=5000

See Also:

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