ODBC API Conformance
The Pervasive ODBC Engine Interface fully conforms to the ODBC v2.5 specifications for core grammar API and Level 1 API, and supports most of the Level 2 function calls. The following table lists the ODBC API functions supported by the Pervasive ODBC Engine Interface and the ODBC Conformance level.
Table 2-4 Interface-supported ODBC API Functions
ODBC Function |
ODBC Conformance Level |
SQLAllocConnect |
Core |
SQLAllocEnv |
Core |
SQLAllocStmt |
Core |
SQLBindCol |
Core |
SQLBindParameter |
Level 1 |
SQLBrowseConnect |
Level 2 |
SQLCancel |
Core |
SQLColAttributes |
Core |
SQLColumns |
Level 1 |
SQLColumnPrivileges |
Level 2 |
SQLConnect |
Core |
SQLDataSources |
Level 2 |
SQLDescribeCol |
Core |
SQLDescribeParam |
Level 2 |
SQLDisconnect |
Core |
SQLDriverConnect |
Level 1 |
SQLDrivers |
Level 2 |
SQLError |
Core |
SQLExecDirect |
Core |
SQLExecute |
Core |
SQLExtendedFetch |
Level 2 |
SQLFetch |
Core |
SQLForeignKeys |
Level 2 |
SQLFreeConnect |
Core |
SQLFreeEnv |
Core |
SQLFreeStmt |
Core |
SQLGetConnectOption |
Level 1 |
SQLGetCursorName |
Core |
SQLGetData |
Level 1 |
SQLGetFunctions |
Level 1 |
SQLGetInfo |
Level 1 |
SQLGetStmtOption |
Level 1 |
SQLGetTypeInfo |
Level 1 |
SQLMoreResults |
Level 2 |
SQLNativeSql |
Level 2 |
SQLNumResultCols |
Core |
SQLNumParams |
Level 2 |
SQLParamData |
Level 1 |
SQLPrepare |
Core |
SQLPrimaryKeys |
Level 2 |
SQLProcedures |
Level 2 |
SQLProcedureColumns |
Level 2 |
SQLPutData |
Level 1 |
SQLRowCount |
Core |
SQLSetConnectOption |
Level 1 |
SQLSetCursorName |
Core |
SQLSetPos |
Level 2 |
SQLSetStmtOption |
Level 1 |
SQLSpecialColumns |
Level 1 |
SQLStatistics |
Level 1 |
SQLTables |
Level 1 |
SQLTablePrivileges |
Level 2 |
SQLTransact |
Core |
Exceptions to ODBC API Conformance
The following section contains details on the exceptions to ODBC API conformance as specified in Table 2-4 .
SQLMoreResults
The Pervasive ODBC Engine Interface always returns
sql_no_data_found
for this function. The Pervasive ODBC Engine Interface supports this function, with its return value, due to requirements of Microsoft Access.
SQLSetStmtOption / SQLGetStmtOption
The following table lists the options the Pervasive ODBC Engine Interface supports for SQLSetStmtOption and SQLGetStmtOption:
Table 2-5 Options for SQLSetStmtOption and SQLGetStmtOption
fOption (numerical value) |
vParam |
Comments |
SQL_QUERY_TIMEOUT(0) |
|
Supported through SQLSetStmtOption and SQLSetConnectOption. Applies only to SQLExecDirect, SQLExecute, SQLFetch, and SQLExtendedFetch. Does not apply to DDL statements. |
SQL_MAX_ROWS(1) |
|
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_NOSCAN(2) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_MAX_LENGTH(3) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_ASYNC_ENABLE(4) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_BIND_TYPE(5) |
|
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_CURSOR_TYPE(6) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_CONCURRENCY(7) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_ROWSET_SIZE(9) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_RETRIEVE_DATA(11) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
SQL_USE_BOOKMARK(12) |
|
Supported according to the Microsoft ODBC Programmer's Reference |
1151 |
in the format: Tablename,Password (no space between the Tablename and the Password) |
A Pervasive ODBC Engine Interface extension: appends password for table to an internal list in Pervasive ODBC Engine Interface so that the user does not have to be prompted for the password. |
1153 |
0 (default) turns off table locking; 1 turns on table locking. |
A Pervasive ODBC Engine Interface extension: When vParam is set to 1, all tables used by the hStmt are exclusively locked when a select, update, insert, delete, or create index statement is executed on the hStmt. The tables remain locked until the hStmt is dropped (by calling SQLFreeStmt with the SQL_DROP option) or the option is set to DEFLOCK and the hStmt is re-executed. Locked tables can only be used by the locking hStmt; they cannot be used by any other hStmts. |
SQLSetConnectOption and SQLGetConnectOption
The following table lists the options the Pervasive ODBC Engine Interface supports for SQLSetConnectOption and SQLGetConnectOption:
Table 2-6 Options for SQLSetConnectOption and SQLGetConnectOption
fOption (numerical value) |
Comments |
SQL_QUERY_TIMEOUT(0) |
Supported through SQLSetStmtOption and SQLSetConnectOption. Applies only to SQLExecDirect, SQLExecute, SQLFetch, and SQLExtendedFetch. Does not apply to DDL statements. |
SQL_MAX_ROWS(1) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_NOSCAN(2) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_ASYNC_ENABLE(4) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_BIND_TYPE(5) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_CURSOR_TYPE(6) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_CONCURRENCY(7) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_ROWSET_SIZE(9) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_RETRIEVE_DATA(11) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_USE_BOOKMARKS(12) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_ACCESS_MODE(101) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_AUTO(102) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_TXN_ISOLATION(108) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQL_ODBC_CURSORS(110) |
Supported according to the Microsoft ODBC Programmer's Reference. |
SQLGetTypeInfo
SQLGetTypeInfo generates a list of native data type names (type_name) specified by the Pervasive ODBC Engine Interface. For example, SQL_CHAR
is mapped to CHARACTER
. Use the names which are returned from this function for the data type names for columns in a CREATE TABLE or ALTER TABLE statement or for parameters for procedures or declared variables in procedures and triggers.
SQLSpecialColumns
The Pervasive ODBC Engine Interface uses unique indexes as the optimal set of columns that uniquely identifies a row in the table. When a new row is inserted, the Pervasive ODBC Engine Interface does not return the values for autoincrement columns. You may determine the value for an autoincrement column through the use of the @@IDENTITY variable. See @@IDENTITY .
SQLGetInfo
The Pervasive ODBC Interface returns identical values for SQL_DRIVER_VER
and SQL_DBMS_VER
. This version value is returned in the following format:
08.00.0147 010
This value can be interpreted as four components, which are shown in the following table:
Part |
Value |
Description |
08
|
Major version |
The major version of the Pervasive.SQL database engine. |
00
|
Minor version |
The minor version of the Pervasive.SQL database engine, which is typically updated in a service pack. |
0147
|
Build number |
The build further specifies the release by marking the time at which Pervasive Software generated the release. |
010
|
Point build |
A minor update to the build. The build number and point build uniquely identify a product release created at a specific time. |
The following table summarizes the expected format of other values typically returned by SQLGetInfo
.
Item |
Value |
SQL_DRIVER_NAME
|
W3ODBCCI.DLL |
SQL_DRIVER_VER
|
08.00.0147 010 |
SQL_DRIVER_ODBC_VER
|
02.50 |
SQL_DBMS_NAME
|
Pervasive.SQL |
SQL_DBMS_VER
|
08.00.0147 010 |
SQL_ODBC_VER
|
03.52.0000 |