ODBC Support
ODBC Interface Support
The relational interface supports the ODBC v3.51 specifications for Core, Level 1, and Level 2 interface support levels.
Exceptions to ODBC Interface Support
Core Level
SQL_BEST_ROWID
The relational interface uses unique indexes as the optimal set of columns that identifies a row in the table.
When a new row is inserted into a table that includes an IDENTITY column, the relational interface does not return the value assigned to the IDENTITY column. You may determine the value for an IDENTITY column through the use of the @@IDENTITY variable. See @@IDENTITY.
Level 2
SQL_ROWVER
See SQL_BEST_ROWID above.
SQL_ATTR_LOGIN_TIMEOUT
Not supported
ODBC API Support
The following table lists the ODBC API functions supported by the relational interface and the ODBC support level.
Exceptions to ODBC API Support
The following section contains details on the exceptions to ODBC API support.
SQLGetTypeInfo
SQLGetTypeInfo generates a list of native data type names (type_name) specified by the relational 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.
See also Pervasive PSQL Data Types and Equivalent ODBC Data Types for a list of supported ODBC data types.
SQLSpecialColumns
The relational 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 relational interface does not return the values for IDENTITY columns. You may determine the value for an IDENTITY column through the use of the @@IDENTITY variable. See @@IDENTITY.
SQLGetData
If your application calls SQLGetData to return data into an SQL_C_NUMERIC structure, the ODBC standard specifies that the SQL_DESC_SCALE field is set to zero and the SQL_DESC_PRECISION field uses the driver-defined precision.
Pervasive PSQL use the values for scale and driver-defined precision as defined in the metadata. Consider the following example, in which scale is set to two.
CREATE TABLE testnum (col1 NUMERIC(10,2))
INSERT INTO testnum VALUES (10.34)
SELECT * FROM testnum
The SELECT statement returns 10.34, not 10.00.
SQLGetInfo
The relational interface returns identical values for SQL_DRIVER_VER and SQL_DBMS_VER. This version value is returned in the following format:
aa.bb.cccc ddd
This value can be interpreted as four components as explained in the following table:
The following table summarizes the expected format of other values typically returned by SQLGetInfo. The values are examples only.
ODBC Attribute Support
The relational interface provides ODBC v3.51 attribute support, with the following exceptions.
Exceptions to ODBC Attribute Support
Statement Attribute Support
The following table lists the exceptions to ODBC statement attribute support:
Connection Attribute Support
The following table lists the exceptions to ODBC Connection Attribute support:
ODBC Descriptor Field Support
The relational interface provides ODBC v3.51 descriptor field support, with the following exceptions.
Exceptions to ODBC Descriptor Support
The following table lists the exceptions to ODBC descriptor field support:
Descriptor Fields and Bitness Values
Note that some of the descriptor fields that can be set through the various ODBC SQLSet and SQLGet functions have been changed to accommodate 64-bit values while others are still 32-bit values. If you are using the 64-bit ODBC driver, ensure that you use the appropriate sized variable when setting and retrieving these fields. For more information, refer to the Microsoft ODBC documentation. See especially http://msdn.microsoft.com/en-us/library/ms716287%28VS.85%29.aspx.
A point of clarification is that SQL_ROWSET_SIZE is supported by both SQLGetStmtOption and SQLGetStmtAttr. If you are using the 64-bit ODBC driver and you call either SQLGetStmtOption or SQLGetStmtAttr, a 64-bit value is returned in *ValuePtr when that attribute parameter is set to SQL_ROWSET_SIZE.
SQLSetStmtOption Options
The section discusses the Pervasive PSQL support for the following SQLSetStmtOption options:
The following tables indicate valid set values for each option.