TimesTen ODBC 2.5 Support
This section covers these topics for TimesTen 2.5 support.
Using ODBC 2.5 With TimesTen
An ODBC 2.5 application not using a driver manager will continue to work with the TimesTen ODBC driver through its call to SQLAllocEnv
.
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.
ODBC 2.5 Function Support
TimesTen supports certain ODBC 2.5 functions.
Note:
-
The TimesTen ODBC driver supports wide-character (W) function versions for applications not using a generic driver manager, as indicated in Table 10-11.
-
In ODBC 2.5, TimesTen supports some ODBC 3.0 handle types (such as
SQLHDBC
andSQLHENV
) as well as ODBC 2.0 handle types (such asHDBC
andHENV
). TimesTen recommends using ODBC 3.0 handle types. TheFAR
modifier that is mentioned in ODBC 2.0 documentation is not required.
Table 10-11 Supported ODBC 2.5 Functions
Function | Notes |
---|---|
|
No notes |
|
No notes |
|
No notes |
|
No notes |
|
|
|
Do not call |
|
See Column Descriptor Support for ODBC 2.5 SQLColAttributes. |
|
Call returns "driver not capable". |
|
For catalog functions, TimesTen supports only an empty string or |
|
Note the TimesTen name for the "W" function. |
|
Available only to programs using a driver manager. |
|
No notes |
|
No notes |
|
No notes |
|
No notes |
|
Available only to programs using a driver manager. |
|
Native error codes are TimesTen errors. You may receive generic errors such as, "Execution at Oracle failed. Oracle error code When using
|
|
See |
|
TimesTen does not support asynchronous statement execution. (TimesTen does not support the |
|
The return code is defined as
|
|
For catalog functions, TimesTen supports only an empty string or |
|
No notes |
|
No notes |
|
No notes |
|
See Option Support for ODBC 2.5 SQLSetConnectOption and SQLGetConnectOption. Also see ODBC 2.5 Function Signatures That Have Changed. Support is added for the TimesTen driver manager (TTDM). This is documented in Attribute Support for ODBC 3.5 SQLSetConnectAttr and SQLGetConnectAttr. |
|
You can set or get a cursor name but not reference it, such as in a |
|
See Avoid SQLGetData. |
|
No notes |
|
|
|
See Option Support for ODBC 2.5 SQLSetStmtOption and SQLGetStmtOption. |
|
For catalog functions, TimesTen supports only an empty string or |
|
No notes |
|
No notes |
|
No notes |
|
No notes |
|
|
|
No notes |
|
For catalog functions, TimesTen supports only an empty string or |
|
For catalog functions, TimesTen supports only an empty string or |
|
For catalog functions, TimesTen supports only an empty string or |
|
No notes |
|
In addition to its standard functionality, this is used with TimesTen cache groups. See Retrieving Information About Cache Groups. |
|
See Option Support for ODBC 2.5 SQLSetConnectOption and SQLGetConnectOption under the next section. |
|
You can set or get a cursor name but not reference it, such as in a |
|
This is an ODBC 1.0 function, replaced by |
|
Call returns "driver not capable". |
|
See Option Support for ODBC 2.5 SQLSetStmtOption and SQLGetStmtOption. |
|
TimesTen supports only the For catalog functions, TimesTen supports only an empty string or |
|
For catalog functions, TimesTen supports only an empty string or |
|
Call returns "driver not capable". |
|
For catalog functions, TimesTen supports only an empty string or |
|
No notes |
Option Support for ODBC 2.5 SQLSetConnectOption and SQLGetConnectOption
The ODBC 2.5 SQLSetConnectOption
and SQLGetConnectOption
functions enable you to set connection options after the initial connection or retrieve those settings. Some of these correspond to connection attributes you can set during the connection process.
Table 10-12 lists standard options supported by TimesTen for The ODBC 2.5 SQLSetConnectOption
and SQLGetConnectOption
functions.
For TimesTen-specific connection options, see Table 10-4. These options are supported for both ODBC 2.5 and ODBC 3.5.
Also see Option Support for ODBC 2.5 SQLSetStmtOption and SQLGetStmtOption. Those options can also be set using SQLSetConnectOption
, in which case the value serves as a default for all statements on the connection.
Note:
-
An option setting through
SQLSetConnectOption
orSQLSetStmtOption
overrides the setting of the corresponding connection attribute (as applicable). -
The documentation here also applies to
SQLSetConnectOptionW
andSQLGetConnectOptionW
. -
Where TimesTen connection attributes are mentioned as being equivalent to ODBC connection options, see Connection Attributes in Oracle TimesTen In-Memory Database Reference.
Table 10-12 Standard connection options (ODBC 2.5)
Option | Notes |
---|---|
|
No notes |
|
See ODBC 2.5 Function Signatures That Have Changed (refer to |
|
No notes |
|
Supported for programs using a driver manager |
|
Supported for programs using a driver manager |
|
Supported for programs using a driver manager |
Supported for See Prefetching Multiple Rows of Data for information about the relationship between prefetching and isolation level. Also see Concurrency Control Through Isolation and Locking in Oracle TimesTen In-Memory Database Operations Guide and Isolation in Oracle TimesTen In-Memory Database Reference. |
Option Support for ODBC 2.5 SQLSetStmtOption and SQLGetStmtOption
The ODBC 2.5 SQLSetStmtOption
and SQLGetStmtOption
functions enable you to set or retrieve statement option settings.
Table 10-13 lists standard options supported by TimesTen for the ODBC 2.5 SQLSetStmtOption
and SQLGetStmtOption
functions, with notes about the support.
For TimesTen-specific statement options, see Table 10-6. These options are supported for both ODBC 2.5 and ODBC 3.5.
To set an option default value for all statements associated with a connection, use SQLSetConnectOption
.
Note:
An option setting through SQLSetConnectOption
or SQLSetStmtOption
overrides the setting of the corresponding connection attribute (as applicable).
Table 10-13 Standard Statement Options (ODBC 2.5)
Option | Notes |
---|---|
|
|
|
No notes |
|
Note:
The SQL_MAX_LENGTH
option can be set, but any specified value is overridden with 0 (return all available data).
Column Descriptor Support for ODBC 2.5 SQLColAttributes
The SQLColAttributes
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.
Table 10-14 describes TimesTen-specific column descriptors.
Table 10-14 TimesTen Column Descriptors: SQLColAttributes
Descriptor | Comment/Description |
---|---|
|
Returns |
|
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 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 2.5 SQLGetInfo
There is support in the TimesTen ODBC 2.5 implementation for information types for the ODBC function SQLGetInfo.
Table 10-15 documents TimesTen support for standard information types introduced in ODBC 1.0 and 2.0, as well as ODBC 3.0 information types supported by the TimesTen ODBC 2.5 implementation (as indicated), noting the TimesTen-specific correct value or values returned.
See Information Type Support for ODBC 3.5 SQLGetInfo for TimesTen-specific information types, which are supported for both ODBC 3.5 and ODBC 2.5.
Table 10-15 TimesTen Support for Standard Information Types: SQLGetInfo (ODBC 2.5)
Information Type | Notes and Correct Values Returned by TimesTen |
---|---|
|
"Y" |
|
"Y" |
|
|
|
0: Allocated from heap, no limit on concurrency. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
|
|
0: Bookmarks persist through none of the operations. |
|
"Y" |
|
|
|
|
|
0: |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
|
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
|
|
|
|
"": Empty string. |
|
"N" |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
|
|
Pointer to driver connection handle. |
|
Pointer to driver environment handle. |
|
Note: If you use a driver manager, this returns the pointer to the TimesTen library. |
|
Pointer to driver statement handle. |
|
The file name of the TimesTen ODBC driver library for your platform. |
|
"3.51" for ODBC 3.5; "2.50" for ODBC 2.5. |
|
A string indicating the TimesTen version. For example, "22.01.0001.0001 Oracle TimesTen version 22.1.1.1.0". |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
"Y" |
|
|
|
|
|
|
|
SELECT dept, MAX(salary) FROM employee GROUP BY dept, age; |
|
|
|
""": A string with one quote mark, which is the quote character. |
|
|
|
"Y" |
|
16384 |
|
|
Alias |
|
Alias |
|
|
|
Alias |
|
Alias |
|
Alias |
|
Alias |
18 |
|
4194304 |
|
|
|
|
|
0: No specific maximum length. |
|
4194304 |
Alias |
|
Alias |
|
Alias |
|
Alias |
|
|
"N" |
|
"Y" |
|
"N" |
|
|
|
|
|
|
|
"N" |
|
N/A, implemented by the driver manager. |
Alias |
|
|
"Y" |
|
"Y" |
|
"owner" |
|
|
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
0: Scrollable cursors not supported. |
|
"procedure" |
|
"Y" |
|
0: Catalog names as qualifiers not supported. |
|
|
|
"data store" |
|
0: Catalogs not supported. |
|
|
|
"N" |
|
|
|
"\\" |
|
"": Empty string. |
|
"@#$": A string indicating the special characters. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
ODBC 3.0 information type supported by TimesTen ODBC 2.5 implementation. See Information Type Support for ODBC 3.5 SQLGetInfo. |
|
|
|
|
|
|
|
"table" |
|
|
|
|
|
|
Alias |
|
Alias |
|
|
|
|
At runtime, returns a string containing the user name. |
Note:
If you use InfoType
value SQL_DRIVER_HDBC
, SQL_DRIVER_HENV
, or SQL_DRIVER_HSTMT
, refer to ODBC 2.5 Function Signatures That Have Changed.
TimesTen SQL Keywords for ODBC 2.5
This section lists the TimesTen SQL keywords returned for SQL_KEYWORDS
in a SQLGetInfo
call.
This is different from the list of TimesTen reserved words. See Reserved Words in Oracle TimesTen In-Memory Database SQL Reference.
ABS, ACCOUNT, ACTIVE, ADDMONTHS, ADMIN, AFFINITY, AGENT, AGING, ALLOW, ASCIISTR, ASYNCHRONOUS, AUTHID, AUTOREFRESH, AWT, BATCH, BIG, BIGINT, BINARY, BINARY_DOUBLE, BINARY_DOUBLE_INFINITY, BINARY_DOUBLE_NAN, BINARY_FLOAT, BINARY_FLOAT_INFINITY, BINARY_FLOAT_NAN, BITAND, BITMAP, BITNOT, BITOR, BITXOR, BLOB, BODY, BYTE, BYTES, CACHE, CACHEONLY, CACHE_MANAGER, CALL, CHECKING, CHR, CLOB, COLUMNAR, COMMITTED, COMPILE, COMPLETE, COMPRESS, CONCAT, CONFLICT, CONFLICTS, CS, CUBE, CURRENT_SCHEMA, CURRVAL, CYCLE, DATASTORE, DATASTORE_OWNER, DAYS, DEBUG, DECODE, DEFINED, DEFINER, DEFINITION, DELETE_FT, DESTROY, DICTIONARY, DIRECTORY, DISABLE, DISTRIBUTE, DUPLICATE, DURABLE, DURATION, DYNAMIC, ELEMENT, ENABLE, ENCRYPTED, ENDSEQ, EVERY, EXACT, EXCLUDE, EXIT, EXPIRE, EXTERNALLY, FACTOR, FAILTHRESHOLD, FAST, FIRST_VALUE, FLUSH, FOLLOWING, FORCE, FORMAT, FUNCTION, GETDATE, GRID, GROUPING, GROUPING_ID, GROUP_ID, HASH, HEARTBEAT, HIERARCHY, HOURS, ID, IDENTIFIED, IGNORE, INCREMENT, INCREMENTAL, INFINITE, INLINE, INSERTONLY, INSTANCE, INSTR, INSTR4, INSTRB, LAST_VALUE, LATENCY, LENGTH, LENGTH4, LENGTHB, LIBRARY, LIFETIME, LIMIT, LIMIT_FT, LOAD, LOAD_FT, LOCK, LOG, LONG, LRU, MASTER, MASTERIP, MATCHED, MATERIALIZED, MAXVALUE, MAXVALUES, MERGE, MIGRATORY, MILLISECOND, MILLISECONDS, MINUS, MINUTES, MINVALUE, MOD, MODE, MODIFY, MULTI, NAME, NAN, NCHAR_CS, NCHR, NCLOB, NEXTVAL, NLSSORT, NOBATCH, NOCACHE, NOCYCLE, NOMAXVALUE, NOMINVALUE, NONDURABLE, NOORDER, NOWAIT, NULLS, NUMBER, NUMTODSINTERVAL, NUMTOYMINTERVAL, NVARCHAR, NVARCHAR2, NVL, OFF, OPTIMIZED, ORACLE, ORA_CHAR, ORA_DATE, ORA_FLOAT, ORA_NCHAR, ORA_NVARCHAR2, ORA_SYSDATE, ORA_TIMESTAMP, ORA_VARCHAR2, OUT, OVER, PACKAGE, PAGES, PAIR, PARALLEL, PARTITION, PASSWORD, PAUSED, PLSQL_WARNINGS, PORT, PRECEDING, PRIORITY, PRIVATE, PROPAGATE, PROPAGATOR, PUBLICREAD, PUBLICROW, QUIT, RANGE, RC, READERS, READONLY, RECEIPT, REFERENCE, REFRESH, REFRESH_FT, RELAXED, RELEASE, RENAME, REPLACE, REPLICATION, REPORT, REPORTING, REQUEST, RESUME, RETURN, RETURNING, REUSE, RLE, ROLLUP, ROUTE, ROW, ROWID, ROWIDONLY, ROWNUM, RR, RTRIM, RU, SECONDS, SELF, SEQBATCH, SEQCACHE, SEQUENCE, SERVICES, SETS, SETTINGS, SPECIFICATION, SQL_TSI_DAY, SQL_TSI_FRAC_SECOND, SQL_TSI_HOUR, SQL_TSI_MINUTE, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_SECOND, SQL_TSI_WEEK, SQL_TSI_YEAR, STANDARD, STANDBY, START, STARTSEQ, STATE, STATIC, STOPPED, STORE, SUBSCRIBER, SUBSCRIBERIP, SUBSTR, SUBSTR4, SUBSTRB, SUSPEND, SYNCHRONOUS, SYNONYM, SYSDATE, SYSDBA, SYSTEM, TAG, TIMEOUT, TIMESTAMPADD, TIMESTAMPDIFF, TINYINT, TO_BLOB, TO_CHAR, TO_CLOB, TO_DATE, TO_LOB, TO_NCLOB, TO_NUMBER, TO_TIMESTAMP, TRAFFIC, TRANSMIT, TREE, TRUNC, TRUNCATE, TRUSTED, TT_BIGINT, TT_BINARY, TT_CHAR, TT_DATE, TT_DECIMAL, TT_HASH, TT_INT, TT_INTEGER, TT_INTERVAL, TT_NCHAR, TT_NVARCHAR, TT_SMALLINT, TT_SYSDATE, TT_TIME, TT_TIMESTAMP, TT_TINYINT, TT_VARBINARY, TT_VARCHAR, TWOSAFE, UID, UNBOUNDED, UNISTR, UNLOAD, UNLOCK, USE, USERMANAGED, VARBINARY, VARCHAR2, WAIT, WRAPPED, WRITETHROUGH, XLA, XML, XYZZY