Supported API Functions

The following identifies the CORE, Level 1, and Level 2 API functions supported by the BASIS ODBC Driver:

CORE Functions

Level 1 Functions

Level 2 Functions

SQLAllocConnect 

SQLColumns

SQLColumnPrivileges

SQLAllocEnv 

SQLDriverConnect

SQLDataSources

SQLAllocStmt 

SQLGetConnectOption

SQLDescribeParam ****

SQLBindCol 

SQLGetData

SQLForeignKeys

SQLBindParameters * 

SQLGetFunctions

SQLNumParams

SQLCancel 

SQLGetInfo *****

SQLPrimaryKeys

SQLColAttributes 

SQLGetStmtOption

SQLTablePrivileges

SQLConnect 

SQLGetTypeInfo

 

SQLDescribeCol 

SQLParamData

 

SQLDisconnect 

SQLPutData

 

SQLError 

SQLSetConnectOption

 

SQLExecDirect 

SQLSetStmtOption

 

SQLExecute 

SQLSpecialColumns

 

SQLFetch 

SQLStatistics ***

 

SQLFreeConnect 

SQLTables

 

SQLFreeEnv 

 

 

SQLFreeStmt 

 

 

SQLGetCursorName 

 

 

SQLNumResultCols 

 

 

SQLPrepare 

 

 

SQLRowCount 

 

 

SQLSetCursorName 

 

 

SQLBindParam 

 

 

SQLTransact ** 

 

 

*The number of allowable parameters for SQLBindParameters is 255.

**SQLTransact is allowed, although operations occur in auto-commit mode.

***SQLStatistics may not respect the uniqueness of index segments that have unique non-primary index segments. In PRO/5, when a multi-keyed file index is constructed where it contains one or more unique segments that are not the first segment, PRO/5 assumes that the entire index is unique. In the BASIS ODBC Driver, when a unique segment occurs in the non-primary position of an index, it is reported that the entire index is non-unique. This behavior was put into the BASIS ODBC Driver to ensure that certain products (MS Access) behave correctly when mixed unique/non-unique segments in an index are encountered and does not affect application performance or function.

****SQLDescribeParam parameters are always returned as SQL_VARCHAR or SQL_NUMERIC.

*****SQLGetInfo is passed SQL_NULL_COLLATION, and returns with SQL_NC_LOW. Through the SQLGetInfo() function, the following ODBC Scalar Functions are supported:

Supported ODBC Scalar Functions

ABS

ACOS(double)

ASCII

ASIN

ATAN

ATAN2

CEILING

CHAR

COT

CONCAT

COS

CURDATE

CURTIME

DATABASE

DAYNAME

DAYOFMONTH

DAYOFWEEK

DAYOFYEAR

DEGREES

DEGREES

DIFFERENCE

EXP

FLOOR

HOUR

INSERT

LCASE

LEFT

LENGTH

LOG

LOG10

LTRIM

MINUTE

MOD

MONTH

MONTHNAME

NOW

PI

POWER

POWER

QUARTER

RADIANS

RADIANS

RAND

RAND

RAND

ROUND

ROUND

REPEAT

REPLACE

RIGHT

RTRIM

SECOND

SIGN

SIN

SOUNDEX

SPACE

SQRT(double)

SUBSTRING

TAN(double)

TRIM

TRUNCATE

UCASE

USER

WEEK

YEAR

The ODBC scalar function extension syntax is also supported:

select { fn left(last_name,4) } from customer

It is not necessary to use the ODBC scalar function extension syntax to access Scalar Functions in the BASIS ODBC Driver. This syntax is provided for products that use the extension syntax with scalar functions. The above query could have been represented as:

select left(last_name,4) from customer

The ODBC CONVERT function is supported with the arguments SQL_DECIMAL and SQL_CHAR. For example:

select convert(cust_num,sql_decimal), convert(last_name,sql_char) from customer