TimesTen ODBC 3.5 Support

This section covers theses topics for TimesTen ODBC 3.5 support.

Using ODBC 3.5 With TimesTen

In accordance with the ODBC 3.5 specification, an ODBC 3.5 application calls SQLSetEnvAttr to set SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3 directly after calling SQLAllocHandle.

For example:

RetCode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hEnv);
...
RetCode = SQLSetEnvAttr(hEnv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0);
...
RetCode = SQLAllocHandle(SQL_HANDLE_DBC, hEnv, &hDbc);
...
RetCode = SQLDriverConnect(hDbc, winHandle, connStr, SQL_NTS,
                           outConnStr, outConnStrBufferLen,
                           &outConnStrLen, SQL_DRIVER_NOPROMPT);
...

Tip:

Because TimesTen Release 22.1 is a major release, you should recompile and relink existing ODBC applications. Also see ODBC API Incompatibilities With Previous Versions of TimesTen.

It is also advisable to link your applications dynamically rather than statically.

Client/Server Cross-Release Restrictions With ODBC 3.5

Previous TimesTen releases support cross-release client/server connections, where the client version could be either newer or older than the server version (such as a 22.1 client connecting to an 18.1 server, or an 18.1 client connecting to a 22.1 server).

Due to changes in ODBC 3.5 functionality, TimesTen clients of Release 18.1 or later cannot connect to an older TimesTen server when the client declares itself to be ODBC 3.x compliant by specifying SQL_ODBC_OV3 in a SQLSetEnvAttr call (such as shown in the preceding section).

Note:

This limitation does not impact ODBC 2.5 applications.

ODBC 3.5 New and Replacement Function Support

There are new and replacement ODBC 3.5 functions supported by TimesTen.

Note:

TimesTen supports wide-character (W) function versions for applications not using a generic driver manager, as indicated in Table 10-1 and Table 10-11.

Table 10-1 Supported ODBC 3.5 New and Replacement Functions

Function Notes

SQLAllocHandle

With applicable settings for HandleType, replaces ODBC 2.5 functions SQLAllocEnv, SQLAllocConnect, and SQLAllocStmt.

SQLBulkOperations

Call returns "Driver not capable."

SQLCloseCursor

Replaces the ODBC 2.5 function SQLFreeStmt when that function is used with the SQL_CLOSE option.

SQLColAttribute and SQLColAttributeW

Replaces the ODBC 2.5 function SQLColAttributes.

See TimesTen Field Identifiers for ODBC 3.5 SQLColAttribute.

SQLCopyDesc

No notes

SQLEndTran

Replaces the ODBC 2.5 function SQLTransact.

SQLFetchScroll

TimesTen supports only the SQL_FETCH_NEXT option (forward scroll).

SQLFreeHandle

With applicable settings for HandleType, replaces ODBC 2.5 functions SQLFreeEnv, SQLFreeConnect, and SQLFreeStmt.

SQLGetConnectAttr and SQLGetConnectAttrW

Replaces the ODBC 2.5 function SQLGetConnectOption.

Support is added for the TimesTen driver manager (TTDM).

See Attribute Support for ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr.

SQLGetDescField and SQLGetDescFieldW

No notes

SQLGetDescRec and SQLGetDescRecW

No notes

SQLGetDiagField and SQLGetDiagFieldW

Replaces the ODBC 2.5 function SQLError.

Native error codes are TimesTen errors. You may receive generic errors such as, "Execution at Oracle failed. Oracle error code nnn."

When using SQLGetDiagField or SQLGetDiagFieldW:

  • Use TT_MAX_MESSAGE_LENGTH instead of SQL_MAX_MESSAGE_LENGTH (which is a limit of 512 bytes).

  • Handle a possible return of SQL_SUCCESS_WITH_INFO (for example, in case the message length exceeded the input buffer size).

SQLGetDiagRec and SQLGetDiagRecW

Replaces the ODBC 2.5 function SQLError.

Native error codes are TimesTen errors. You may receive generic errors such as, "Execution at Oracle failed. Oracle error code nnn."

When using SQLGetDiagRec or SQLGetDiagRecW:

  • Use TT_MAX_MESSAGE_LENGTH instead of SQL_MAX_MESSAGE_LENGTH (which is a limit of 512 bytes).

  • Handle a possible return of SQL_SUCCESS_WITH_INFO (for example, in case the message length exceeded the input buffer size).

SQLGetEnvAttr

Support is added for the TimesTen driver manager (TTDM).

See Attribute Support for ODBC 3.5 SQLGetEnvAttr.

SQLGetInfo

See Information Type Support for ODBC 3.5 SQLGetInfo.

SQLGetStmtAttr and SQLGetStmtAttrW

Replaces the ODBC 2.5 function SQLGetStmtOption.

See Attribute Support for ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr.

SQLSetConnectAttr and SQLSetConnectAttrW

Replaces the ODBC 2.5 function SQLSetConnectOption.

See Attribute Support for ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr.

SQLSetDescField

No notes

SQLSetDescRec

No notes

SQLSetEnvAttr

Required for ODBC applications to set SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3.

SQLSetStmtAttr and SQLSetStmtAttrW

Replaces the ODBC 2.5 function SQLSetStmtOption.

See Attribute Support for ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr.

ODBC 3.5 Data Type Support Notes

TimesTen supports new ODBC 3.5 data types.

  • SQL_C_NUMERIC

  • SQL_C_TYPE_DATE

  • SQL_C_TYPE_TIME

  • SQL_C_TYPE_TIMESTAMP

TimesTen does not support these data types or has limited support:

  • SQL_GUID: TimesTen does not support conversion of this type to a C type.

  • SQL_INTERVAL_xxxx: TimesTen does not support conversion of interval types to C types.

  • SQL_WCHAR: TimesTen does not support conversion of this type to C numeric types.

Environment Attribute Support for ODBC 3.5

There are standard environment attributes supported by TimesTen in ODBC 3.5.

Table 10-2 Standard Environment Attributes (ODBC 3.5)

Attribute Notes

SQL_ATTR_ODBC_VERSION

Supported values SQL_OV_ODBC3 and SQL_OV_ODBC2.

SQL_ATTR_OUTPUT_NTS

Supported value SQL_TRUE.

Attribute Support for ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr

There are support of standard attributes by TimesTen for the ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr functions. Also, there are TimesTen-specific connection attributes, which are supported in both ODBC 3.5 and ODBC 2.5.

Table 10-3 lists support of standard attributes by TimesTen for the ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr functions. Table 10-4 lists TimesTen-specific connection attributes, which are supported in both ODBC 3.5 and ODBC 2.5. These functions enable you to set connection attributes after the initial connection or retrieve those settings.

Also see Attribute Support for ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr. Those attributes can also be set using SQLSetConnectAttr, in which case the value serves as a default for all statements on the connection.

Note:

  • An attribute setting through SQLSetConnectAttr or SQLSetStmtAttr overrides the setting of the corresponding connection attribute (as applicable).

  • The documentation here also applies to SQLSetConnectAttrW and SQLGetConnectAttrW.

  • The TimesTen driver manager (TTDM) is supported through the TT_TTDM_CONNECTION_TYPE attribute, as described in Table 10-4.

Table 10-3 Standard Connection Attributes (ODBC 3.5)

Attribute Notes

SQL_ATTR_ASYNC_ENABLE

Supported setting SQL_ASYNC_ENABLE_OFF.

SQL_ATTR_AUTO_IPD

Read-only (get); value is always SQL_TRUE.

SQL_ATTR_CONNECTION_DEAD

Read-only (get).

SQL_ATTR_CONNECTION_TIMEOUT

Supported setting 0; any other setting reverts to 0.

SQL_ATTR_ENLIST_IN_DTC

Driver not capable.

SQL_ATTR_METADATA_ID

Supported setting SQL_FALSE.

Table 10-4 TimesTen Connection Attributes

Attribute Notes

TT_CLIENT_TIMEOUT

This is for client/server only and has the same functionality as the TTC_Timeout TimesTen client connection attribute.

Also see Choose SQL and PL/SQL Timeout Values in Oracle TimesTen In-Memory Database Operations Guide.

TT_DYNAMIC_LOAD_ENABLE

See Enabling or Disabling Dynamic Load in Oracle TimesTen In-Memory Database Cache Guide. This has the same functionality as the DynamicLoadEnable cache general connection attribute.

TT_DYNAMIC_LOAD_ERROR_MODE

See Returning Errors for Dynamic Load in Oracle TimesTen In-Memory Database Cache Guide. This has the same functionality as the DynamicLoadErrorMode cache connection attribute.

TT_GRID_ENABLED_DATABASE

Read-only (get). This indicates whether the database is from a TimesTen instance enabled for TimesTen Scaleout.

TT_NLS_LENGTH_SEMANTICS

This has the same functionality as the NLS_LENGTH_SEMANTICS general connection attribute. See Additional Globalization Features.

TT_NLS_NCHAR_CONV_EXCP

This has the same functionality as the NLS_NCHAR_CONV_EXCP general connection attribute. See Additional Globalization Features.

TT_NLS_SORT

This has the same functionality as the NLS_SORT general connection attribute. There is related information about the functionality in Additional Globalization Features.

TT_NO_RECONNECT_ON_FAILOVER

Read-only (get). See Configuration of Automatic Client Failover. This indicates the setting of the TimesTen connection attribute TTC_NoReconnectOnFailover (for client connections only).

TT_PREFETCH_CLOSE

Set to TT_PREFETCH_CLOSE_ON to optimize query performance. The default setting is TT_PREFETCH_CLOSE_OFF. Refer to Optimizing Query Performance.

TT_REGISTER_FAILOVER_CALLBACK

See ODBC Support for Automatic Client Failover. This attribute is client-only. If you attempt to use it in TimesTen direct mode, SQL_SUCCESS is returned but no action is taken.

TT_REPLICATION_TRACK

For ODBC applications that use parallel replication and specify replication tracks, this has the same functionality as the ReplicationTrack general connection attribute, to specify a track number for the connection.

TT_TTDM_CONNECTION_TYPE

For ODBC applications using TTDM, specifying this as the attribute returns a value indicating the type of connection represented by the HDBC object, one of the following:

  • TT_TTDM_CONN_NONE: The HDBC is not connected.

  • TT_TTDM_CONN_DIRECT: The HDBC is connected in direct mode.

  • TT_TTDM_CONN_CLIENT: The HDBC is connected in client/server mode.

See the example below.

This example shows the use of SQLGetConnectAttr with the attribute TT_TTDM_CONNECTION_TYPE for an application using TTDM. The connection type, as documented in the table immediately above, is returned in connType.

SQLINTEGER connType = 0;
rc = SQLGetConnectAttr(hdbc, TT_TTDM_CONNECTION_TYPE, &connType, SQL_IS_INTEGER, NULL);

Attribute Support for ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr

There are standard attributes supported by TimesTen for the ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr functions. Also, there are TimesTen-specific statement attributes, which are supported in both ODBC 3.5 and ODBC 2.5.

Table 10-5 lists standard attributes supported by TimesTen for the ODBC 3.5 SQLSetStmtAttr and SQLGetStmtAttr functions. Table 10-6 lists TimesTen-specific statement attributes, which are supported in both ODBC 3.5 and ODBC 2.5. These functions enable you to set or retrieve statement attribute settings.

To set an attribute default value for all statements associated with a connection, use SQLSetConnectAttr.

Note:

Table 10-5 Standard Statement Attributes (ODBC 3.5)

Attribute Notes

SQL_ATTR_APP_PARAM_DESC

No notes

SQL_ATTR_APP_ROW_DESC

No notes

SQL_ATTR_CURSOR_SCROLLABLE

Supported setting SQL_NONSCROLLABLE.

SQL_ATTR_CURSOR_SENSITIVITY

Supported setting SQL_INSENSITIVE.

SQL_ATTR_ENABLE_AUTO_IPD

No notes

SQL_ATTR_IMP_PARAM_DESC

Read-only (get).

SQL_ATTR_IMP_ROW_DESC

Read-only (get).

SQL_ATTR_METADATA_ID

Supported setting SQL_FALSE.

SQL_ATTR_PARAM_BIND_OFFSET_PTR

No notes

SQL_ATTR_PARAM_BIND_TYPE

No notes

SQL_ATTR_PARAM_OPERATION_PTR

No notes

SQL_ATTR_PARAM_STATUS_PTR

No notes

SQL_ATTR_PARAMS_PROCESSED_PTR

No notes

SQL_ATTR_PARAMSET_SIZE

No notes

SQL_ATTR_ROW_ARRAY_SIZE

No notes

SQL_ATTR_ROW_BIND_OFFSET_PTR

No notes

SQL_ATTR_ROW_STATUS_PTR

No notes

SQL_ATTR_ROWS_FETCHED_PTR

No notes

Table 10-6 TimesTen Statement Attributes

Attribute Notes

TT_NET_MSG_MAX_BYTES

In client/server, determines the maximum number of bytes in the result set buffer. See Configuring the Result Set Buffer Size in Client/Server Using ODBC.

TT_NET_MSG_MAX_ROWS

In client/server, determines the maximum number of rows in the result set buffer. See Configuring the Result Set Buffer Size in Client/Server Using ODBC.

TT_PREFETCH_COUNT

See Prefetching Multiple Rows of Data.

TT_QUERY_THRESHOLD

See Setting a Threshold Duration for SQL Statements. This is to specify a time threshold for SQL statements, in seconds, after which TimesTen writes a warning to the support log.

TT_PRIVATE_COMMANDS

Commands are not shared with any other connection. See PrivateCommands in Oracle TimesTen In-Memory Database Reference.

TT_STMT_PASSTHROUGH_TYPE

Determines whether a specific prepared statement is passed through to Oracle Database by the cache passthrough feature. The value returned by SQLGetStmtOption can be either TT_STMT_PASSTHROUGH_NONE or TT_STMT_PASSTHROUGH_ORACLE.

Note: In TimesTen, this option is supported only with SQLGetStmtOption.

See Determining Passthrough Status. Also see Setting a Passthrough Level in Oracle TimesTen In-Memory Database Cache Guide.

Attribute Support for ODBC 3.5 SQLGetEnvAttr

This section describes TimesTen environmental attributes for SQLGetEnvAttr.

Table 10-7 lists TimesTen-specific environment attributes, which are supported in both ODBC 3.5 and ODBC 2.5. These attributes support the TimesTen driver manager (TTDM).

Table 10-7 TimesTen Environment Attributes

Attribute Notes

TT_TTDM_CAPABILITIES

For ODBC applications using TTDM, if you specify this as the attribute and pass a pointer to a SQLINTEGER for the ValuePtr parameter, then a value is returned indicating the capabilities that are currently available through TTDM. The value is expressed as a bit-wise OR of these constants:

  • TT_TTDM_CLIENT: Client/server driver capabilities are available.

  • TT_TTDM_DIRECT: Direct driver capabilities are available.

  • TT_TTDM_XLA: XLA capabilities are available.

  • TT_TTDM_ROUTING: Routing API capabilities are available.

  • TT_TTDM_UTILITY: C utility API functions are available.

See the example below.

Note: The available capabilities depend on what is available in the TimesTen environment where the TTDM-based application is executing.

TT_TTDM_VERSION

For ODBC applications using TTDM, if you specify this as the attribute and pass a pointer to a SQLINTEGER for the ValuePtr parameter, then the value returned indicates the TimesTen release (specifically, of the TTDM library) that the application is using, such as 18.1.4.9.0 or 22.1.1.1.0.

See the example below.

This example shows the use of SQLGetEnvAttr with the attribute TT_TTDM_VERSION for an application using TTDM.

SQLCHAR ttdmver[21];
rc = SQLGetEnvAttr(henv, TT_TTDM_VERSION, (SQLPOINTER)ttdmver, sizeof(ttdmver), NULL);

The value returned in ttdmver indicates the TimesTen release of the TTDM library that the application is using.

The next example shows the use of SQLGetEnvAttr with the attribute TT_TTDM_CAPABILITIES for an application using TTDM.

SQLINTEGER ttdmcap = 0;
rc = SQLGetEnvAttr(henv, TT_TTDM_CAPABILITIES, (SQLPOINTER)&ttdmcap, 0, NULL);

The value returned in ttdmcap is a bitwise OR of the constants documented in the table above, indicating what capabilities are currently available through TTDM. Then check what capabilities are supported:

...
if ( ttdmcap & TT_TTDM_CLIENT )
     printf("TTDM: Client driver functions are available\n");
if ( ttdmcap & TT_TTDM_DIRECT )
     printf("TTDM: Direct driver functions are available\n");
if ( ttdmcap & TT_TTDM_XLA )
     printf("TTDM: XLA functions are available\n");
if ( ttdmcap & TT_TTDM_ROUTING )
     printf("TTDM: Routing API functions are available\n");
if ( ttdmcap & TT_TTDM_UTILITY )
     printf("TTDM: Utility functions are available\n");
...

TimesTen Field Identifiers for ODBC 3.5 SQLColAttribute

The SQLColAttribute function returns descriptor information for a column in a result set.

Refer to ODBC API reference documentation for complete information about this function and standard column descriptors.

Note:

This replaces SQLColAttributes (plural) in ODBC 2.5.

See Table 10-8.

Table 10-8 TimesTen Field Identifiers: SQLColAttribute (ODBC 3.5)

Descriptor Comment/Description

TT_COLUMN_INLINE

Returns TRUE for columns with inline data, or FALSE otherwise. This is returned in the SQLColAttribute CharacterAttributePtr parameter.

TT_COLUMN_LENGTH_SEMANTICS

For character-type columns, this returns "BYTE" for columns with byte length semantics and "CHAR" for columns with character length semantics. For non-character columns, it returns "". The information is returned in the SQLColAttribute CharacterAttributePtr parameter.

This information refers to whether data length is measured in bytes or characters. Length semantics in TimesTen are the same as in Oracle Database. See Length Semantics in Oracle Database Globalization Support Guide.

Information Type Support for ODBC 3.5 SQLGetInfo

There is support in the TimesTen ODBC 3.5 implementation for standard and TimesTen-specific information types for the ODBC function SQLGetInfo.

Table 10-9 documents TimesTen support for standard information types that were introduced or renamed in ODBC 3.0, noting the TimesTen-specific correct value or values returned.

Refer to the following location for standard information:

https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetinfo-function

Also see Information Type Support for ODBC 2.5 SQLGetInfo. Those information types are still supported by the TimesTen ODBC 3.5 driver (with some renamed, as noted).

Table 10-9 TimesTen Support for Standard Information Types: SQLGetInfo (ODBC 3.5)

Information Type Notes and Correct Values Returned by TimesTen

SQL_ACTIVE_ENVIRONMENTS

0: Environment objects are allocated from heap.

SQL_AGGREGATE_FUNCTIONS

SQL_AF_ALL, SQL_AF_AVG, SQL_AF_COUNT, SQL_AF_DISTINCT, SQL_AF_MAX, SQL_AF_MIN, SQL_AF_SUM

SQL_ALTER_DOMAIN

0: ALTER DOMAIN statement not supported.

SQL_ALTER_TABLE

SQL_AT_ADD_COLUMN_DEFAULT: ADD COLUMN clause is supported, with facility to specify column defaults (FIPS transitional level).

SQL_AT_ADD_COLUMN_SINGLE: ADD COLUMN clause is supported (FIPS transitional level).

SQL_AT_ADD_CONSTRAINT: ADD COLUMN clause is supported, with facility to specify column constraints (FIPS transitional level).

SQL_AT_ADD_TABLE_CONSTRAINT: ADD TABLE CONSTRAINT clause is supported (FIPS transitional level).

SQL_AT_DROP_COLUMN_CASCADE: DROP COLUMN ... CASCADE clause is supported (FIPS transitional level).

SQL_AT_DROP_COLUMN_DEFAULT: ALTER COLUMN ... DROP COLUMN DEFAULT clause is supported (Intermediate level).

SQL_ASYNC_MODE

SQL_AM_NONE: Asynchronous mode not supported.

SQL_BATCH_ROW_COUNT

0: Batches of SQL statements not supported.

SQL_BATCH_SUPPORT

0: Batches of SQL statements not supported.

SQL_CATALOG_LOCATION

0: Catalog names as qualifiers not supported.

SQL_QUALIFIER_LOCATION in ODBC 2.5.

SQL_CATALOG_NAME

"N": Catalog names as qualifiers not supported.

SQL_CATALOG_NAME_SEPARATOR

NULL: Not supported.

SQL_QUALIFIER_NAME_SEPARATOR in ODBC 2.5.

SQL_CATALOG_TERM

"data store"

SQL_QUALIFIER_TERM in ODBC 2.5.

SQL_CATALOG_USAGE

0: Catalogs not supported.

SQL_QUALIFIER_USAGE in ODBC 2.5.

SQL_COLLATION_SEQ

Current value of the NLS_SORT database parameter.

Note: Because TimesTen does not have a default character set, default collation for the default character is set is not applicable. NLS_SORT is the collation for the current character set.

SQL_CONVERT_GUID

0: CONVERT function not supported.

SQL_CONVERT_INTERVAL_DAY_TIME

0: CONVERT function not supported.

SQL_CONVERT_INTERVAL_YEAR_MONTH

0: CONVERT function not supported.

SQL_CONVERT_WCHAR

0: CONVERT function not supported.

SQL_CONVERT_WLONGVARCHAR

0: CONVERT function not supported.

SQL_CONVERT_WVARCHAR

0: CONVERT function not supported.

SQL_CREATE_ASSERTION

0: CREATE ASSERTION statement not supported.

SQL_CREATE_CHARACTER_SET

0: CREATE CHARACTER SET statement not supported.

SQL_CREATE_COLLATION

0: CREATE COLLATION statement not supported.

SQL_CREATE_DOMAIN

0: CREATE DOMAIN statement not supported.

SQL_CREATE_SCHEMA

0: CREATE SCHEMA statement not supported.

SQL_CREATE_TABLE

To determine which clauses are supported:

SQL_CT_CREATE_TABLE: CREATE TABLE statement is supported (entry level).

SQL_CT_TABLE_CONSTRAINT: Specifying table constraints is supported (FIPS transitional level).

SQL_CT_CONSTRAINT_NAME_DEFINITION: <constraint name definition> clause is supported for naming column and table constraints (intermediate level).

To specify the ability to create temporary tables:

SQL_CT_COMMIT_PRESERVE: Deleted rows are preserved on commit (full level).

SQL_CT_COMMIT_DELETE: Deleted rows are deleted on commit (full level).

SQL_CT_GLOBAL_TEMPORARY: Global temporary tables can be created (full level).

To specify the ability to create column constraints:

SQL_CT_COLUMN_CONSTRAINT: Specifying column constraints is supported (FIPS transitional level).

SQL_CT_COLUMN_DEFAULT: Specifying column defaults is supported (FIPS transitional level).

SQL_CREATE_TRANSLATION

0: CREATE TRANSLATION statement not supported.

SQL_CREATE_VIEW

SQL_CV_CREATE_VIEWS

SQL_CURSOR_SENSITIVITY

SQL_SENSITIVE: Cursors are sensitive to changes made by other cursors within the same transaction.

SQL_DATETIME_LITERALS

SQL_DL_SQL92_DATE, SQL_DL_SQL92_TIME, SQL_DL_SQL92_TIMESTAMP

SQL_DDL_INDEX

SQL_DI_CREATE_INDEX, SQL_DI_DROP_INDEX

SQL_DESCRIBE_PARAMETER

"Y": Parameters can be described.

SQL_DM_VER

ERROR IM001: Driver does not support this function. Applies to driver manager only.

SQL_DRIVER_HDESC

Pointer to driver descriptor handle.

SQL_DROP_ASSERTION

0: DROP ASSERTION statement not supported.

SQL_DROP_CHARACTER_SET

0: DROP_CHARACTER_SET statement not supported.

SQL_DROP_COLLATION

0: DROP_COLLATION statement not supported.

SQL_DROP_DOMAIN

0: DROP_DOMAIN statement not supported.

SQL_DROP_SCHEMA

0: DROP_SCHEMA statement not supported.

SQL_DROP_TABLE

SQL_DT_DROP_TABLE

SQL_DROP_TRANSLATION

0: DROP_TRANSLATION statement not supported.

SQL_DROP_VIEW

SQL_DV_DROP_VIEW

SQL_DYNAMIC_CURSOR_ATTRIBUTES1

None: Dynamic cursors not supported.

SQL_DYNAMIC_CURSOR_ATTRIBUTES2

None: Dynamic cursors not supported.

SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1

SQL_CA1_NEXT, SQL_CA1_SELECT_FOR_UPDATE

SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2

SQL_CA2_READ_ONLY_CONCURRENCY, SQL_CA2_MAX_ROWS_SELECT

SQL_INDEX_KEYWORDS

SQL_IK_ALL: All keywords supported.

SQL_INFO_SCHEMA_VIEWS

None: Views in the INFORMATION_SCHEMA not supported.

SQL_INSERT_STATEMENT

SQL_IS_INSERT_LITERALS, SQL_IS_INSERT_SEARCHED, SQL_IS_SELECT_INTO

SQL_INTEGRITY

"N"

SQL_ODBC_SQL_OPT_IEF in ODBC 2.5.

SQL_KEYSET_CURSOR_ATTRIBUTES1

None: Keyset cursors not supported.

SQL_KEYSET_CURSOR_ATTRIBUTES2

None: Keyset cursors not supported.

SQL_KEYWORDS

TT_SQL_KEYWORDS: A character string that contains a comma-separated list of TimesTen-specific SQL keywords.

See TimesTen SQL Keywords for ODBC 3.5.

SQL_MAX_ASYNC_CONCURRENT_STATEMENTS

0: No specific limit to number of active concurrent statements in asynchronous mode.

SQL_MAX_CATALOG_NAME_LEN

Alias SQL_MAXIMUM_CATALOG_NAME_LENGTH

0: No specific maximum length.

SQL_MAX_QUALIFIER_NAME_LEN in ODBC 2.5.

SQL_MAX_CONCURRENT_ACTIVITIES

Alias SQL_MAXIMUM_CONCURRENT_ACTIVITIES

0: Allocated from heap, no limit on concurrency.

SQL_ACTIVE_STATEMENTS in ODBC 2.5.

SQL_MAX_DRIVER_CONNECTIONS

Alias SQL_MAXIMUM_DRIVER_CONNECTIONS

sb_DbConnMaxUser: Daemon connections limited to this value.

SQL_ACTIVE_CONNECTIONS in ODBC 2.5.

SQL_MAX_IDENTIFIER_LEN

Alias SQL_MAXIMUM_IDENTIFIER_LENGTH

sb_ObjNameLenMax

SQL_MAX_ROW_SIZE_INCLUDES_LONG

"N"

SQL_MAX_SCHEMA_NAME_LEN

Alias SQL_MAXIMUM_SCHEMA_NAME_LENGTH

sb_ObjNameLenMax

SQL_MAX_OWNER_NAME_LEN in ODBC 2.5.

SQL_ODBC_INTERFACE_CONFORMANCE

SQL_OIC_CORE: Minimum level, including basic interface elements such as connection functions, functions for preparing and executing an SQL statement, basic result set metadata functions, and basic catalog functions.

SQL_PARAM_ARRAY_ROW_COUNTS

SQL_PARC_NO_BATCH

SQL_PARAM_ARRAY_SELECTS

SQL_PAS_NO_SELECT

SQL_SCHEMA_TERM

"owner"

SQL_OWNER_TERM in ODBC 2.5.

SQL_SCHEMA_USAGE

SQL_OU_DML_STATEMENTS: Schemas supported in all DML statements.

SQL_OU_PROCEDURE_INVOCATION: Schemas supported in the ODBC procedure invocation statement.

SQL_OU_TABLE_DEFINITION: Schemas supported in CREATE TABLE, CREATE VIEW, ALTER TABLE, DROP TABLE, and DROP VIEW statements.

SQL_OU_INDEX_DEFINITION: Schemas supported in CREATE INDEX and DROP INDEX statements.

SQL_OU_PRIVILEGE_DEFINITION: Schemas are supported in GRANT and REVOKE statements.

SQL_OWNER_USAGE in ODBC 2.5.

SQL_SQL_CONFORMANCE

SQL_SC_SQL92_ENTRY: Entry level SQL-92 compliant.

SQL_SQL92_DATETIME_FUNCTIONS

None: Datetime scalar functions not supported.

SQL_SQL92_FOREIGN_KEY_DELETE_RULE

SQL_SFKD_CASCADE

SQL_SQL92_FOREIGN_KEY_UPDATE_RULE

SQL_SFKU_SET_DEFAULT, SQL_SFKU_SET_NULL

SQL_SQL92_GRANT

SQL_SG_DELETE_TABLE, SQL_SG_INSERT_TABLE, SQL_SG_REFERENCES_TABLE, SQL_SG_SELECT_TABLE, SQL_SG_UPDATE_TABLE (all entry level)

SQL_SQL92_NUMERIC_VALUE_FUNCTIONS

SQL_SNVF_EXTRACT

SQL_SQL92_PREDICATES

SQL_SP_BETWEEN, SQL_SP_COMPARISON, SQL_SP_EXISTS, SQL_SP_IN, SQL_SP_ISNOTNULL, SQL_SP_ISNULL, SQL_SP_LIKE (all entry level)

SQL_SQL92_RELATIONAL_JOIN_OPERATORS

SQL_SRJO_CROSS_JOIN (full level), SQL_SRJO_INNER_JOIN (FIPS transitional level), SQL_SRJO_LEFT_OUTER_JOIN (FIPS transitional level), SQL_SRJO_RIGHT_OUTER_JOIN (FIPS transitional level)

SQL_SQL92_REVOKE

SQL_SR_DELETE_TABLE, SQL_SR_INSERT_TABLE, SQL_SR_REFERENCES_TABLE, SQL_SR_SELECT_TABLE, SQL_SR_UPDATE_TABLE (all entry level)

SQL_SQL92_ROW_VALUE_CONSTRUCTOR

None: Row value constructor expressions not supported.

SQL_SQL92_STRING_FUNCTIONS

None: String scalar functions not supported.

SQL_SQL92_VALUE_EXPRESSIONS

SQL_SVE_CASE (intermediate level), SQL_SVE_CAST (FIPS transitional level), SQL_SVE_NULLIF (intermediate level)

SQL_STANDARD_CLI_CONFORMANCE

None: Driver does not conform to CLI standards.

SQL_STATIC_CURSOR_ATTRIBUTES1

SQL_CA1_NEXT, SQL_CA1_SELECT_FOR_UPDATE

SQL_STATIC_CURSOR_ATTRIBUTES2

SQL_CA2_READ_ONLY_CONCURRENCY, SQL_CA2_MAX_ROWS_SELECT

SQL_TIMEDATE_FUNCTIONS

SQL_FN_TD_EXTRACT, SQL_FN_TD_NOW, SQL_FN_TD_TIMESTAMPADD, SQL_FN_TD_TIMESTAMPDIFF

SQL_UNION_STATEMENT

SQL_U_UNION: Data source supports UNION clause.

SQL_U_UNION_ALL: Data source supports ALL keyword in the UNION clause. (SQLGetInfo returns both SQL_U_UNION and SQL_U_UNION_ALL in this case.)

SQL_UNION in ODBC 2.5.

SQL_XOPEN_CLI_YEAR

ERROR IM001: Driver does not support this function. Applies to driver manager only.

Table 10-10 describes TimesTen-specific information types.

Table 10-10 TimesTen Information Types: SQLGetInfo

Information Type Data Type Description

TT_DATA_STORE_INVALID

SQLINTEGER

Returns 1 if the database is in invalid state, such as due to a system or application failure, or 0 if not.

Note: Fatal errors, such as error 846 or 994, invalidate a TimesTen database, causing this item to be set to 1.

TT_DATABASE_CHARACTER_SET

SQLCHAR

Returns the name of the database character set.

TT_DATABASE_CHARACTER_SET_SIZE

SQLINTEGER

Returns the maximum size of a character in the database character set, in bytes.

TT_PLATFORM_INFO

Bit mask

Returns a bit mask indicating platform information. Bit 0 has the value 1 for a 64-bit platform. Bit 1 has the value 1 for big-endian, or the value 0 for little-endian.

TT_REPLICATION_INVALID

SQLINTEGER

Returns 1 if replication is in a failed state, or 0 if not.

See Subscriber Failures in Oracle TimesTen In-Memory Database Replication Guide.

TimesTen SQL Keywords for ODBC 3.5

The list of TimesTen SQL keywords returned for SQL_KEYWORDS in a SQLGetInfo call is the same in TimesTen ODBC 3.5 support as in ODBC 2.5 support.

See TimesTen SQL Keywords for ODBC 2.5.

This is different from the list of TimesTen reserved words. See Reserved Words in Oracle TimesTen In-Memory Database SQL Reference.