ODBC API Incompatibilities With Previous Versions of TimesTen
There are changes introduced in the TimesTen 18.1 release that impact ODBC applications used with previous versions of TimesTen.
These topics are covered:
Overview of ODBC API Incompatibilities
The TimesTen driver is ODBC-compliant; however, beginning in Release 18.1, more recent ODBC header files are provided in the include
directory of the TimesTen installation on Linux and UNIX platforms.
Changes were also made to update some ODBC types and functions to make them 64-bit compatible.
These and other changes may necessitate code changes on any platform. ODBC changes requiring code updates for ODBC applications fall into the following categories:
-
ODBC function changes
-
Function signature changes: A number of function signatures have changed for 64-bit programming.
-
Changes to the size of option or attribute values: This refers to values of connection options, statement options, column attributes, or driver and data source information, either passed or returned. These are now 64-bit values in the circumstances indicated below.
-
-
ODBC data type changes
Tip:
Even if none of the required code changes applies to your applications, you should recompile and relink existing ODBC applications the first time you use a TimesTen 22.1 release.
If your existing TimesTen ODBC application uses features described in the sections that follow, you must update the application as necessary:
ODBC 3.5 Function Signatures That Have Changed
There are ODBC 3.5 functions with changes requiring code updates.
In previous releases, TimesTen provided partial support for ODBC 3.5 functionality, including:
-
Handle allocation methods
-
Diagnostic records
-
Wide character functions
-
Attribute set and get functions for handles
-
SQLColAttribute
-
Miscellaneous functions that map directly to 2.5 functionality such as
SQLCloseCursor
andSQLEndTran
The functions listed in Table 10-16 have changes to the signature or changes to the size of attribute values, requiring code updates for ODBC 3.5 applications, as indicated. Sizes of attribute values apply to values of connection and statement attributes, either passed or returned.
Note:
-
Signature changes apply to either 64-bit or 32-bit environments. Size changes in option and attribute values apply only to 64-bit environments.
-
TimesTen ODBC does not return values for options or attributes related to features that TimesTen does not support. For example:
SQL_ATTR_ASYNC_ENABLE
,SQL_ATTR_ENLIST_IN_DTC
,SQL_ATTR_CURSOR_SCROLLABLE
,SQL_ATTR_CURSOR_SENSITIVITY
,SQL_ATTR_FETCH_BOOKMARK_PTR
,SQL_ATTR_METADATA_ID
,SQL_ATTR_RETRIEVE_DATA
,SQL_ATTR_SIMULATE_CURSOR
,SQL_ATTR_USE_BOOKMARKS
.
Table 10-16 Changes in ODBC 3.5 Functions
Function | Signature Changes | Size Changes in Option and Attribute Values |
---|---|---|
|
N/A |
On UNIX platforms: For the following
|
|
Note: TimesTen-specific attributes (prefixed with |
On UNIX platforms: For the following attributes, a 64-bit value is returned in
|
|
*ValuePtr must be Note: TimesTen-specific attributes (prefixed with |
On UNIX platforms: For the following attributes, a 64-bit value is returned in
|
|
Note: TimesTen-specific attributes (prefixed with |
On UNIX platforms: For the following attributes, a 64-bit value is passed in
|
|
Note: TimesTen-specific attributes (prefixed with |
On UNIX platforms: For the following attributes, a 64-bit value is passed in
|
ODBC 2.5 Function Signatures That Have Changed
There are ODBC 2.5 functions with changes requiring code updates.
The functions listed in Table 10-17 have changes to the signature or changes to the size of option or attribute values, requiring code updates for ODBC 2.5 applications, as indicated. Sizes of option or attribute values apply to values of connection options, statement options, column attributes, or driver and data source information, either passed or returned.
Table 10-17 Changes in ODBC 2.5 Functions
Function | Signature Changes | Size Changes in Option and Attribute Values |
---|---|---|
|
N/A |
On Linux and UNIX platforms: For the following
|
|
The Note: TimesTen-specific options (prefixed with |
On Linux and UNIX platforms: For the option |
|
N/A |
On Linux and UNIX platforms: For the following
|
|
The Note: TimesTen-specific options (prefixed with |
On Linux and UNIX platforms: For the following options, a
|
|
On Linux and UNIX platforms: The |
N/A |
|
The Note: TimesTen-specific options (prefixed with |
On Linux and UNIX platforms: For the option |
|
TimesTen does not support scrollable cursors. This function returns a "Driver not capable" error (S1C00). Note: The ODBC definition of |
N/A |
|
The Note: TimesTen-specific options (prefixed with |
On Linux and UNIX platforms: For the following options, a
|
ODBC Data Types That Have Changed
There are changes to data types that require code updates for ODBC applications.
Table 10-18 ODBC 2.5 Data Types That Have Changed
Data Types | Explanation |
---|---|
|
On Linux and UNIX platforms: These data types have been redefined as |
|
These data types have been deprecated. Use |
|
This data type has been deprecated. Use |
|
On Linux and UNIX platforms: This data type has been redefined as |