PREVNEXTINDEX
 

1 Using the ODBC Client


This chapter provides information about using ODBC applications with the SequeLink Client for ODBC (the ODBC Client).

About the ODBC Client

The ODBC Client supports ODBC applications through a component called the SequeLink for ODBC driver. On Windows and UNIX platforms, the SequeLink for ODBC driver is compliant with the Microsoft Open Database Connectivity (ODBC) 3.5 specification.

ODBC is an Application Program Interface (API) specification that allows applications to access multiple database systems using Structured Query Language (SQL). ODBC provides maximum interoperability-a single application can access many different database systems. This allows an ODBC developer to develop, compile, and ship an application, without targeting a specific type of data source. Users can then add the database drivers, which link the application to the database systems of their choice. The ODBC driver can connect all commercial ODBC-compliant applications with server databases.

For instructions on installing the ODBC Client, refer to the SequeLink Installation Guide.

Using the ODBC Administrator

This information pertains to the Windows environment.

The first step in setting up an ODBC connection is creating an ODBC data source. The ODBC Administrator is installed automatically when you install the SequeLink for ODBC Client on Windows. You use the ODBC Administrator to create and manage ODBC data sources.

To start the ODBC Administrator, click Start, then Programs. From the Programs menu, select DataDirect SequeLink for ODBC 5.5, and then select the ODBC Administrator application. The ODBC Data Source Administrator window appears listing resident data sources.

NOTE: An ODBC Administrator does not exist for UNIX; you must edit the odbc.ini file using a text editor. See "Configuring ODBC Client Data Sources on UNIX" for instructions on creating ODBC client data sources for UNIX.

Configuring ODBC Client Data Sources on Windows

To configure client data sources for the ODBC Client on Windows platforms, you use the ODBC Administrator.

Configuring ODBC User and System Client Data Sources

  1. Start the ODBC Administrator. To start the ODBC Administrator, select Start / Programs. From the Programs menu, select DataDirect SequeLink 5.5 Client for ODBC, and then select the ODBC Administrator application.
  2. Click the User DSN tab or the System DSN tab to list user or system data sources, respectively.


    User DSN tab of the ODBC Data Source Administrator. The first data source listed is highlighted.

  3. To configure a new data source, click the Add button. A list of installed drivers appears. Select DataDirect 32-BIT SequeLink 5.5; then, click Finish.
  4. NOTE: To change an existing data source, select the data source you want to configure and click the Configure button.

    The DataDirect SequeLink for ODBC Setup window appears.


    ODBC SequeLink Driver Setup window. All fields are empty.

  5. Provide the following information; then, click OK.
  6. Data Source Name: Type a unique name that identifies this ODBC data source configuration. Examples are Accounting or SequeLink to Oracle Data.

    Description: Optionally, type a description of the data source, for example, My Accounting Database or Accounting Data in Oracle.

    SequeLink Server Host: Type the TCP/IP host name of the SequeLink service to which the ODBC Client will connect.

    SequeLink Server Port: Type the TCP/IP port the SequeLink service is listening on for connection requests. The port you specify must be the same port that was specified for the SequeLink service when the SequeLink Server was installed; the default is 19996.

    Server Data Source: Type the name of a server data source configured for the SequeLink service to use for the connection, or click the ... button to select an existing server data source. This field is optional. If a server data source is not specified, the default server data source for that SequeLink service is used.

    Translate: Click Translate only if you want to configure an ODBC translator.

    NOTE: We strongly recommend that you do not configure an ODBC translator and rely on the native SequeLink transliteration between server and client code pages.

    The Select Translator dialog box appears, listing translators specified in the ODBC Translators section of the system information file. Select a translator. When satisfied with your choice, click OK to close this dialog box and perform the translation.

    NOTE FOR LDAP USERS: To configure the ODBC Client to retrieve connection information from an LDAP directory, select the Use LDAP check box. The fields change on the lower half of the screen to accommodate the information required to query an LDAP server for connection information. Provide the following information:

    LDAP Server Host: Type the TCP/IP host name of the LDAP server.

    LDAP Server Port: Type the TCP/IP port the LDAP server is listening on for connection requests. If unspecified, the ODBC Client will use the default LDAP port 389.

    Distinguished Name (DN): Type an identifier that uniquely identifies the LDAP entry where the connection information is stored.

For more information about retrieving connection information from LDAP directories, refer to the SequeLink Administrator's Guide.

Configuring ODBC File Client Data Sources

File data sources are data source files that can be stored on a file server, making the files available to any user who can access them.

To configure ODBC file client data sources:

  1. Start the ODBC Administrator by clicking Start, then Programs. From the Programs menu, select DataDirect SequeLink 5.5 Client for ODBC, and then select the ODBC Administrator application.
  2. Click the File DSN tab. The File DSN tab lists any file data sources in the specified directory.

  3. The File DSN tab of the ODBC Administrator. No file data sources are listed for the specified directory.

  4. To configure a new data source, click the Add button. A list of installed drivers appears. Select DataDirect 32-BIT SequeLink 5.5; then, perform one of the following actions:
    • To configure the file data source to connect directly to a SequeLink Server without retrieving connection information from an LDAP directory, click OK. Then, skip to Step 5.
    • To configure the file data source to retrieve connection information from an LDAP directory, continue with the next step.
  5. Click Advanced. The Advanced File DSN Creation Settings window appears.

  6. The Advinced File DSN Creation Settings window. The scrollable box contains the following: DRIVER={DataDirect 32-BIT SequeLink 5.5 } UseLDAP=1

    Type UseLDAP=1 in the Type driver-specific keywords and values scrollable box; then, click OK. You are returned to the list of drivers. Click Next and continue with Step 5.

  7. The Create New Data Source window appears.

  8. The Create New Data Source window.

    Type the name of the file data source you want to create or click Browse to select an existing file data source; then, click Next.

  9. The Create New Data Source displays the settings you have configured for this data source.

  10. Create New Data Source window, with information about the new File data source you have just configured. To change the file name or selected driver, click the Back button. You cannot make changes in this window.

  11. Click Finish to create the file data source. A series of connection dialogs appear as described in "ODBC Connection Dialogs". The file data source will be saved after you enter the correct information in the connection dialog boxes.

ODBC Connection Dialogs

A SequeLink data access connection involves the following stages:

SequeLink data access connection, with a SequeLink Client, SequeLink Server, and a database. Stage 1 and Stage 2 connect  the SequeLink Client and Server. Stage 3 connects the Server to the database, and the Server to the Client.

  1. A network connection is established.
  2. An authentication mechanism is used to establish the identity of the SequeLink Client to the SequeLink Server.
  3. Based on information provided by the SequeLink Client application (for example, a database user name and password), a database connection is established.

Stage 1: Establishing a Network Connection

The first stage of the connection process involves establishing a network connection. The dialog box that appears depends on whether the connection has been configured to connect directly to a SequeLink service or to retrieve connection information for the SequeLink service from a centralized LDAP directory.

Connecting Directly to a SequeLink® Service

If the connection has been configured to connect directly to a SequeLink service, the Connect to the SequeLink Server dialog box appears.

Connect to the SequeLink Server dialog box. The SequeLink Server Host and Port fields have been completed.

Provide the following information; then, click OK.

SequeLink Server Host: Type the TCP/IP host name of the SequeLink service.

SequeLink Server Port: Type the TCP/IP port on which the SequeLink service is listening. A default installation of SequeLink Server uses the port 19996.

Server Data Source: Type the name of a server data source to use for the connection, or select one from the drop-down list. This step is optional. If a server data source is not specified, the default server data source for that service will be used for the connection.

Retrieving Connection Information from an LDAP Directory

If the connection has been configured to connect to an LDAP server to retrieve connection information from an LDAP directory, the Connect to the SequeLink Server dialog box appears.

Connect to the SequeLink Server dialog box, showing the LDAP Server Host field completed.

Provide the following information; then, click OK.

LDAP Server Host: Type the TCP/IP host name of the LDAP server.

LDAP Server Port: Type the TCP/IP port on which the LDAP server is listening.

Distinguished Name: Type the Distinguished Name (DN) of the LDAP entry.

Stage 2: SequeLink® Server Authentication

The second stage of the connection process involves authentication of the SequeLink Client to the SequeLink Server. The dialog boxes that appear depend on how authentication is configured for the SequeLink service.

For more information about configuring authentication, refer to the SequeLink Administrator's Guide.

Stage 3: Data Store Logon

The last stage of the connection process involves logging on the data store. The dialog boxes that appear depend on the data store logon method configured for the SequeLink service:

For more information about configuring data store logon methods, refer to the SequeLink Administrator's Guide.

Testing ODBC Connections on Windows

  1. On the SequeLink Client, start the ODBC Administrator. To start the ODBC Administrator, select Start / Programs. From the Programs menu, select DataDirect SequeLink for ODBC 5.5, and then select the ODBC Administrator application. The ODBC Data Source Administrator window appears listing resident data sources.

  2. User DSN tab of the ODBC Data Source Administrator  window

  3. Create an ODBC data source as described in "Configuring ODBC Client Data Sources on Windows", specifying the TCP/IP address and TCP/IP port of the SequeLink service.
  4. Click the Test Connect button to test the connection. If successful, a dialog appears telling you the connection was successful. You are now ready to start using your ODBC applications with SequeLink.

Configuring ODBC Client Data Sources on UNIX

Information for UNIX users

For UNIX, an ODBC Administrator does not exist. This section describes how to configure the system information file and how to set some required environment variables to use the ODBC 32-bit Client and ODBC 64-bit Client on UNIX.

NOTE: LDAP is not supported on UNIX 64-bit on AIX and Solaris.

Configuring the System Information File

To configure an ODBC data source for UNIX, you must edit the odbc.ini file (32-bit Client) or odbc64.ini file (64-bit Client) using the attributes in Table 1-1.

Example: odbc.ini for Solaris

The following code shows an example of an odbc.ini file for a 32-bit ODBC Client installed on a Solaris machine:

[ODBC Data Sources] 
SALESDB=DataDirect 32-BIT SequeLink 5.5 
 
[SALESDB] 
Driver=SALES/lib/ivslk20.so 
Description=DataDirect 32-BIT SequeLink 5.5 
Host= 
Port= 
UseLDAP=0 
DistinguishedName= 
 
[ODBC] 
Trace=0 
TraceFile=odbctrace.out 
TraceDll=path_of_installdir/lib/odbctrac.so 
InstallDir=path_of_installdir 

where path_of_installdir is the path to the ODBC Client installation directory.

Example: odbc64.ini for Solaris

The following code shows an example of the odbc64.ini file for a 64-bit ODBC Client installed on a Solaris machine:

[ODBC Data Sources] 
SALESDB=DataDirect 64-BIT SequeLink 5.5 
 
[AccountingDB] 
Driver=Accounting/lib64/ivslk20.so 
Description=DataDirect 64-BIT SequeLink 5.5 
Host= 
Port= 
UseLDAP=0 
DistinguishedName= 
 
[ODBC] 
Trace=0 
TraceFile=odbctrace.out 
TraceDll=path_of_installdir/lib64/odbctrac.so 
InstallDir=path_of_installdir 

where path_of_installdir is the path to the ODBC Client installation directory.

Setting Environment Variables

You must set several environment variables for the ODBC Client on UNIX by executing a shell script located in the installation directory.

To execute the shell script:

Executing this shell script sets the following environment variables:

ODBCINI
Specifies where the centralized odbc.ini or odbc64.ini file is located.
SQLNK_ODBC_HOME
Specifies the full path of the directory containing the ODBC Client shared libraries.

Executing this shell script also sets the appropriate library search environment variable (LD_LIBRARY_PATH on Solaris and Linux, SHLIB_PATH on HP-UX, or LIBPATH on AIX).

Using a Centralized System Information File

Because UNIX is a multi-user environment, you may want to use a single centralized odbc.ini file controlled by a system administrator. To do this, set the ODBCINI environment variable to point to the fully qualified pathname of the centralized file.

For example:

The odbc.ini file also require an [ODBC] section that includes the InstallDir keyword. The value of the InstallDir keyword must be the path to the directory that contains the /lib and /messages directories.

For example, if you choose the default installation directory for the 32-bit ODBC Client, the following line must be in the [ODBC] section of the odbc.ini file:

InstallDir=/usr/slodbc55 

Connecting Using a Connection String

If you want to use a connection string for connecting to a database, or if your application requires it, you must specify either a DSN (data source name) or a DSN-less connection in the string. The difference is whether you use the DSN= or the DRIVER= keyword in the connection string, as described in the ODBC specification. A DSN connection string tells the driver where to find the default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in the data source.

If your application requires a connection string to connect to a data source, you must specify the data source name that tells the driver which data source to use for the default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in the data source.

The DSN connection string has the form::

DSN=data_source_name[;attribute=value[;attribute=value]...] 

For example, a connection string for SequeLink may look like this:

DSN=Accounting;DB=EMP;UID=JOHN;PWD=XYZZY 

or

DSN=Accounting;DB="X:IV;EMP";UID=JOHN;PWD=XYZZY 

NOTE: If the database name (DB) contains a semicolon (;), you must place the name in quotes, as shown in the preceding example.

The DSN-less connection string specifies a driver instead of a data source. All connection information must be entered in the connection string because there is no data source storing the information.

The DSN-less connection string has the form:

DRIVER=[{]driver_name[}][;attribute=value[;attribute=value] 
...] 

NOTE: Empty string is the default value for attributes that use a string value unless otherwise noted.

A DSN-less connection string must provide all necessary connection information:

DRIVER=DataDirect 32-BIT SequeLink 5.5;DB=Emp;UID=JOHN; 
PWD=XYZZY 

See "ODBC Connection Attributes" for a list of ODBC connection attributes and their valid values.

See "DSN-less Connections in UNIX" for more information about using DSN-less connections.

DSN-less Connections in UNIX

Information for UNIX users

Connections to a data source can be made via a connection string without referring to a data source name (DSN-less connections). This is accomplished by specifying the "DRIVER=" instead of the "DSN=" keyword in a connection string, as outlined in the ODBC specification. For this to work on UNIX and Linux, a file called odbcinst.ini must exist when the driver encounters DRIVER= in a connection string.

By default, Setup installs a sample odbcinst.ini file in the same location as the sample odbc.ini file, which is in the product installation directory. See "Configuring the System Information File" for an explanation of the odbc.ini file. The environment variable ODBCINST, recognized by the DataDirect SequeLink for ODBC driver, must be set to point to the fully qualified path name of the odbcinst.ini file.

For example, to point to the default location of the file in the C shell, you would set this variable as follows:

setenv ODBCINST /opt/sl55/client/odbcinst.ini 

In the Bourne or Korn shell, you would set it as:

ODBCINST=/opt/sl55/client/odbcinst.ini;export ODBCINST 

If the ODBCINST variable is not set, the driver looks in the user's home directory for a file named odbcinst.ini. If the driver does not find the file, it returns the message:

HY000 - "ODBCINST.INI is not available in the directory 
pointed to by the ODBCINST environment variable (or the 
current user's HOME directory) and therefore DSN-Less 
connections cannot be made." 

The following is a sample odbcinst.ini.

[ODBC Drivers] 
DataDirect 32-BIT SequeLink 5.5 = Installed 
DataDirect 64-BIT SequeLink 5.5 = Installed 
 
[DataDirect 32-BIT SequeLink 5.5] 
APILevel=1 
ConnectFunctions=YYN 
Driver=/export/home/carl/5_05_00/lib/ivslk20.so 
DriverODBCVer=3.52 
FileUsage=0 
SQLevel=1 
 
[DataDirect 64-BIT SequeLink 5.5] 
APILevel=1 
ConnectFunctions=YYN 
Driver=/export/home/carl/5_05_00/lib64/ivslk20.so 
DriverODBCVer=3.52 
FileUsage=0 
SQLevel=1 

ODBC Connection Attributes

Table 1-1 lists ODBC connection attributes in alphabetical order. The list includes long and short names and provides a description of each attribute. Short names are shown enclosed within parentheses ( ).

The default values listed in the table are initial defaults that apply when no value is specified in the connection string or in the ODBC data source definition. If you specified a value for the attribute when configuring the ODBC data source, that value is your default.

Table 1-1. ODBC Connection Attributes 
Attribute
Description
ApplicationID (APPID)
Specifies the application ID that identifies the client application to the SequeLink service. This attribute is only required when the SequeLink service you are connecting to has been configured to limit access to specific applications.
See "Specifying Application IDs" for more information about using application IDs to limit access to the SequeLink services.
ApplicationName (APPNAME)
Identifies the application that is establishing the connections.
The initial default is SequeLink for ODBC Application.
AutomaticApplicationID (AUTOAPPID)
Specifies an application ID that is automatically generated by the ODBC Client to identify the client application to the SequeLink service. This attribute is only required when the SequeLink service you are connecting to has been configured to limit access to specific applications.
See "Specifying Application IDs" for more information about using application IDs to limit access to SequeLink services.
BlockFetchForUpdate (BFFU)
BlockFetchForUpdate={0 | 1}. Specifies a workaround connection attribute. When the isolation level is Read committed and a SELECT FOR UPDATE statement is issued against some data stores, the ODBC Client does not lock the expected row.
When set to 0, the appropriate row is locked.
When set to 1 (the initial default), the appropriate row is not locked.
NOTE: Specifying 0 will degrade the performance for SELECT FOR UPDATE statements because rows will be fetched one at a time.
Database (DB)
Specifies the name of the database to which you want to connect.
DSN (DSN)
Specifies a string that identifies an ODBC data source configuration. Examples include Accounting or SequeLink to Oracle Data.
DBLogonID (DBUID)
Specifies the data store user name, which may be required depending on the server configuration.
DBPassword (DBPWD)
Specifies the data store password, which may be required depending on the server configuration.
DistinguishedName (DN)
Specifies the distinguished name identifying the LDAP entry from which connection information is retrieved. This attribute is required when UseLDAP=1.
EnableDescribeParam (EDP)
EnableDescribeParam={0 |1}. Specifies a workaround connection attribute for connections to Oracle data stores only.
When set to 0 (the initial default), support is turned off for SQLDescribeParam.
When set to 1, support is turned on for SQLDescribeParam and will describe all parameters as SQL_CHAR with a precision of 999.
FetchNextOnly (FNO)
FetchNextOnly={TRUE | FALSE}. Turns on a workaround for Visual Basic/Remote Data Objects (RDO) that circumvents a problem with FORWARD_ONLY cursors when the driver reports other values than FETCH_NEXT for SQLGetInfo(SQL_FETCH_DIRECTION).
For example, if the driver only reports FETCH_NEXT, RDO performs SQLExecDirect, SQLBindCol, and SQLExtendedFetch(NEXT). If the driver supports more than FETCH_NEXT, RDO performs SQLExecDirect, SQLExtendedFetch(NEXT), and SQLGetData. This is only valid when the rowsize is 1, but RDO uses a larger rowsize in this situation.
When set to TRUE, the driver will incorrectly report that only SQL_FETCH_NEXT is supported, which satisfies RDO.
When set to FALSE (the initial default), the driver will correctly report other values than SQL_FETCH_NEXT.
FixCharTrim (FCT)
FixCharTrim={0 | 1}. Turns on a workaround for applications that have a problem using SQL_CHAR data padded with spaces. The ODBC driver returns SQL_CHAR data padded with spaces as mandated by the ODBC specification.
When set to 0 (the initial default), the workaround is turned off.
When set to 1, SQL_CHAR data that is not padded with spaces is returned.
GetOutputParams (GOP)
Turns on a workaround that allows you to control when output parameters of stored procedures are returned to calling applications. This attribute uses a bitmask with the following options:
When set to 1, output parameters are returned after a SQLExecute.
When set to 2, output parameters are returned after a SQLFetch is complete.
When set to 4, output parameters are returned after SQLMoreResults returns no more rows.
When set to 7 (the initial default), output parameters are returned after all of the above.
The value for this connection attribute should be set to the cumulative value of all chosen options added together.
NOTE: Set GetOutputParams=3 when executing stored procedures with output parameters in RDO (Visual Basic 5 and 6).
HLogonID (HUID)
Specifies the host user name, which may be required depending on the server configuration.
HPassword (HPWD)
Specifies the host password, which may be required depending on the server configuration.
Host (HST)
Specifies the TCP/IP address of the SequeLink Server, specified in dotted format or as a host name.
LDAP: If LDAP is enabled, this attribute identifies the TCP/IP address of the LDAP server. This attribute can also be a list of LDAP servers separated by a blank space (for example, ld1.foo.com ld2.foo.com ld3.foo.com). If the first LDAP server in the list does not respond, the ODBC Client will try to connect to the next LDAP server in the list.
IANAAppCodePage (IACP)
 
Valid values for this attribute are listed in "Values for IANAAppCodePage Connection String Attribute". The code page that you specify must be the same as the code page used by your application.
The driver on UNIX determines the value of the application's code page by checking for an IANAAppCodePage value in the following order:
  • In the connection string
  • In the DataSource section of the system file (odbc.ini)
  • In the ODBC section of the system file (odbc.ini)
  • If no IANAAppCodePage value is found, the driver uses the default value of 4 (ISO 8859-1 Latin-1).
LimitParameterBindSize (LPBS)
Specifies the parameter bind size for SQL_CHAR, SQL_VARCHAR, SQL_BINARY, and SQL_VARBINARY values. When exporting a table from Microsoft Access that contains Null data in a memo column, Microsoft Access binds the parameter with a columnSize of 4294967295. The SequeLink Client attempts to allocate a buffer of this size, which typically fails due to lack of memory.
To get around this application bug, the SequeLink Server can be configured to limit the parameter bind size for SQL_CHAR, SQL_VARCHAR, SQL_BINARY, and SQL_VARBINARY values to a reasonable value.
LogonID (UID)
Specifies the host or data store user name, which may be required depending on the server configuration.
NewPassword (NPWD)
Specifies the new host password to be used. If specified and applicable to the connection, the SequeLink password change mechanism is invoked. When the password has been changed successfully, the following warning is generated:
[DataDirect][ODBC SequeLink driver][SequeLink Server] The user password was changed successfully
If unspecified and the SequeLink Server detects that the host password has expired, you will be prompted for a new host password.
For more information about the SequeLink password change mechanism, refer to the SequeLink Administrator's Guide.
Password (PWD)
Specifies the host or data store password, which may be required depending on the server configuration.
Port (PRT)
Specifies the TCP/IP port on which the SequeLink Server is listening.
LDAP: If LDAP is enabled, this attribute identifies the TCP/IP port on which the LDAP server is listening. If you do not specify a port, the default port for LDAP (389) will be used.
ServerDataSource (SDSN)
Optionally, specifies a string that identifies the server data source to be used for the connection. If not specified, the configuration of the default server data source will be used for the connection.
SessionConnectTimeout (SCTO)
Imposes a time limit on:
  • The establishment of the TCP/IP connection with the server.
  • The establishment of the SequeLink session via an initial handshake with the server (this includes the time to initialize the necessary server processes and/or threads).
SLKStaticCursorLongColBuffLen (SSCLCBL)
Turns on a workaround that allows you to specify the amount of data (in KB) that is buffered for SQL_LONGVARCHAR and SQL_LONGVARBINARY columns with a static cursor.
Because the driver caches Unicode characters (UTF-16-LE on Windows, UTF-8 on UNIX), the number of characters that can be cached is smaller for the long-character, Unicode columns.
The initial default is 4.
TransliterationWorkAroundServer (TWAS)
Turns on a workaround for multiple transliteration workarounds. Refer to the SequeLink Administrator's Guide for more information about how SequeLink handles transliteration.
When set to 1 or 2, this workaround resolves transliteration issues between Shift-JIS/Windows-31j and eucJP by mapping "look-alike" characters.
When set to 0 (the initial default), the workaround is not enabled.
UseLDAP (LDAP)
UseLDAP={0 | 1}. Determines whether the parameters to establish a connection to the SequeLink Server should be retrieved from LDAP.
When set to 0 (the initial default), the SequeLink Client will connect directly to the specified SequeLink Server.
When set to 1, the SequeLink Client will retrieve the TCP/IP host, TCP/IP port, and SequeLink server data source (optional) from an LDAP entry identified by a Distinguished Name (DN). Once the connection information is retrieved, the SequeLink Client will connect directly to the specified SequeLink Server. The DistinguishedName (DN) attribute is required.
WorkArounds (WA)
Turns on workarounds that allow you to take full advantage of the ODBC driver with ODBC applications requiring nonstandard or extended behavior.
IMPORTANT: Each of these options has potential side effects related to its use. An option should only be used to address the specific problem for which it was designed.
When set to 1, the ODBC driver returns 1, allowing Microsoft Access to open tables as read-write. If an ODBC driver reports to Microsoft Access 2.0 that its SQL_CURSOR_COMMIT_BEHAVIOR or SQL_CURSOR_ROLLBACK_BEHAVIOR is 0, Microsoft Access opens tables as read-only.
When set to 2, the driver reports that qualifiers are not supported. This option is provided because some applications cannot handle database qualifiers.
When set to 4, the driver detects when Visual Basic requires multiple connections to a DBMS and has the multiple ODBC connections share a single physical connection to the DBMS. For DBMSs that support only a single connection, the second attempt fails.
When set to 8, the driver returns 1. However, if an ODBC driver cannot detect the number of rows that are affected by an Insert, Update, or Delete statement, it may return -1 in SQLRowCount. Some products cannot handle this.
When set to 16, the driver returns no INDEX_QUALIFIER, allowing Microsoft Access to open the table. If an ODBC driver in SQLStatistics reports to Microsoft Access 1.1 that an INDEX_QUALIFIER contains a period, Microsoft Access returns a tablename is not a valid name error.
WorkArounds (cont.)
When set to 32, users of flat-file drivers are allowed to abort a long-running query by pressing the ESC key.
When set to 64, the result is a column name of Cposition where position is the ordinal position in the result set. For example:
SELECT col1, col2+col3 FROM table1
produces the column names col1 and C2. SQLColAttributes/SQL_COLUMN_NAME returns an empty string for result columns that are expressions. Use this option for applications that cannot handle empty strings in column names.
When set to 256, SQLGetInfo/
SQL_ACTIVE_CONNECTIONS is forced to return as 1.
When set to 512, the SQLSpecialColumns function returns a unique index as returned from SQLStatistics to prevent ROWID results.
When set to 2048, SQLDriverConnect returns Database= instead of DB= in the returned connection string.
When set to 65 536, trailing zeros are stripped from decimal results, which prevents Microsoft Access from generating an error when decimal columns containing trailing zeros are included in the unique index.
When set to 131 072, all occurrences of the double quote character ("") are turned into the accent grave character (`). Some applications always quote identifiers with double quotes. Double quoting causes problems for data sources that do not return SQLGetInfo/
SQL_IDENTIFIER_QUOTE_CHAR = ".
WorkArounds (cont.)
When set to 524 288, the precision and scale settings for SQL_DECIMAL parameters are overridden to precision 40 and scale 20.
When set to 8 388 608, SQLGetInfo/SQL_DATABASE_NAME is returned as an empty string when SQLGetInfo/
SQL_MAX_QUALIFIER_NAME_LEN is 0. This option should be used with Inprise/Borland tools, such as Delphi.
When set to 536 870 912, SQLBindParameter is allowed to be called after SQLExecute to change the precision of previously bound parameters.
When set to 107 3741 824, Microsoft Access assumes that ORDER BY columns do not have to be in the SELECT list. This option provides a workaround for data stores that always use ORDER BY columns.
WorkArounds2 (WA2)
Turns on workarounds that allow you to take full advantage of the ODBC driver with ODBC applications requiring nonstandard or extended behavior.
IMPORTANT: Each of these options has potential side effects related to its use. An option should only be used to address the specific problem for which it was designed.
When set to 2, the driver ignores the ColumnSize/DecimalDigits specified by the application and uses the database defaults instead. Some applications incorrectly specify ColumnSize/DecimalDigits when binding timestamp parameters.
WorkArounds2 (WA2) (cont.)
When set to 4, Microsoft Access uses the most recent native type mapping, as returned by SQLGetTypeInfo, for a specific SQL type. This option reverses the order in which types are returned, so that Microsoft Access will use the most appropriate native type. This option is recommended if you are using Microsoft Access against an Oracle8.x data store.
When set to 32, Microsoft Access requires that the characters "DSN=" are returned by SQLDriverConnect in the connection string output parameter.


PREVNEXTINDEX