Appendix B, The SQL GetInfo Function

4D - Documentation   Français   English   German   4D ODBC, Command Theme List   4D ODBC, Command Alphabetical List   Back   Previous   Next

version 6.0


The SQLGetInfo function was introduced in ODBC 1.0; Extension Level 1. This function returns general information about the driver and data source associated with an hdbc.

Syntax


RETCODE SQL GetInfo(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue)

The SQLGetInfo function accepts the following arguments:

TypeArgumentUseDescription
HDBChdbcInputConnection handle.
UWORDfInfoTypeInputType of information.
PTRrgbInfoValueOutputPointer to storage for the information.
SWORDcbInfoValueMaxInputMaximum length of the rgbInfoValue buffer.
SWORD FAR *pcbInfoValueOutputThe total number of bytes (excluding the null
termination byte for character data) available to
return in rgbInfoValue.

HDBC is the connection handle.

UWORD is the Type of information. fInfoType must be a value representing the type of interest. See the "Comments" section for details.

PTR is a pointer to storage for the information. Depending on the fInfoType requested, the information returned will be one of the following: a null-terminated character string, a 16-bit integer value, a 32-bit flag, or a 32-bit binary value.

SWORD is the Maximum length of the rgbInfoValue buffer.

SWORD FAR * is the total number of bytes (excluding the null termination byte for character data) available to return in rgbInfoValue. For character data, if the number of bytes available to return is greater than or equal to cbInfoValueMax, the information in rgbInfoValue is truncated to cbInfoValueMax - 1 bytes and is null-terminated by the driver. For all other types of data, the value of cbValueMax is ignored and the driver assumes the size of rgbValue is 32 bits.

Returns


 SQL_SUCCESS

 SQL_SUCCESS_WITH_INFO

 SQL_ERROR

 SQL_INVALID_HANDLE

Diagnostics


When SQLGetInfo returns either SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling SQLError. The following table lists the SQLSTATE values commonly returned by SQLGetInfo and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.

SQLSTATEErrorDescription
01000General warningDriver-specific informational message. (Function
returns SQL_SUCCESS_WITH_INFO.)
01004Data truncatedThe rgbInfoValue buffer was not large enough to
return all of the requested information, so the
information was truncated. The pcbInfoValue
argument contains the length of the requested
information in its untruncated form. (Function
returns SQL_SUCCESS_WITH_INFO.)
08003Connection not open(DM) The type of information requested in
fInfoType requires an open connection. Of the
information types reserved by ODBC, only
SQL_ODBC_VER can be returned without an open
connection.
22003Numeric value out of rangeReturning the requested information would have
caused a loss of numeric or binary significance.
IM001Driver does not support (DM) The driver corresponding to the hdbc
this functiondoes not support the function.
S1000General errorAn error occurred for which there was no specific
SQLSTATE and for which no implementation-
specific SQLSTATE was defined. The error message
returned by SQLError in the szErrorMsg argument
describes the error and its cause.
S1001Memory allocation failureThe driver was unable to allocate the memory
required to support execution or completion
of the function.
S1009Invalid argument value(DM) The fInfoType was SQL_DRIVER_HSTMT,
and the value pointed to by rgbInfoValue was not a
valid statement handle.
S1090Invalid string or buffer length(DM) The value specified for the cbInfoValueMax
argument was less than 0.
S1096Information type out of range(DM) The value specified for the fOption argument
was in the block of numbers reserved for
ODBC information types, but was not valid for the
version of ODBC supported by the driver.
S1C00Driver not capableThe value specified for the fOption argument was
in the range of numbers reserved for driver-specific
information types, but was not supported by the
driver.
S1T00Timeout expiredThe timeout period expired before the data source
returned the requested information. The timeout
period is set through SQLSetStmtOption,
SQL_QUERY_TIMEOUT.

Comments


The currently defined information types are described in this section. More will be defined to take advantage of different data sources. Information types from 0 to 999 are reserved by ODBC; driver developers must reserve values greater than or equal to SQL_INFO_DRIVER_START for driver-specific use. For more information, see Driver-Specific Data Types, Descriptor Types, Information Types, and Options in Chapter 11, "Guidelines for Implementing ODBC Functions".

The format of the information returned in rgbInfoValue depends on the fInfoType requested. SQLGetInfo returns information in one of five different formats:

 Null-terminated character string,

 16-bit integer value,

32-bit bitmask,

 32-bit integer value, or

 32-bit binary value.

The format of each of the following information types is noted in the type's description. The application must cast the value returned in rgbInfoValue accordingly. For an example of how an application could retrieve data from a 32-bit bitmask, see the Code Example in this section.

A driver must return a value for each of the information types defined in the following tables. If an information type does not apply to the driver or data source, then the driver returns one of the following values:

Format of rgbInfoValueReturned value
Character string ("Y" or "N")"N"
Character string (not "Y" or "N")Empty string
16-bit integer0
32-bit bitmask or 32-bit binary value0L

If a data source does not support procedures, SQLGetInfo returns the following values for the values of fInfoType that are related to procedures:

fInfoTypeReturned value
SQL_PROCEDURES"N"
SQL_ACCESSIBLE_PROCEDURES"N"
SQL_MAX_PROCEDURE_NAME_LEN0
SQL_PROCEDURE_TERMEmpty string

SQLGetInfo returns SQLSTATE S1096 (Invalid argument value) for values of fInfoType that are in the range of information types reserved for use by ODBC but are not defined by the version of ODBC supported by the driver. To determine what version of ODBC a driver conforms to, an application calls SQLGetInfo with the SQL_DRIVER_ODBC_VER information type. SQLGetInfo returns SQLSTATE S1C00 (Driver not capable) for values of fInfoType that are in the range of information types reserved for driver-specific use but are not supported by the driver.

Note: Application developers should be aware that ODBC 1.0 drivers might return SQL_ERROR and SQLSTATE S1C00 (Driver not capable) for values of fInfoType that were defined in ODBC 1.0 but do not apply to the driver or the data source.

Information Types


This section lists the information types supported by SQLGetInfo. Information types are grouped categorically and listed alphabetically.

Driver Information

The following values of fInfoType return information about the ODBC driver, such as the number of active statements, the data source name, and the API conformance levels.

SQL_ACTIVE_CONNECTIONSSQL_ACTIVE_STATEMENTS
SQL_DATA_SOURCE_NAMESQL_DRIVER_HDBC
SQL_DRIVER_HENVSQL_DRIVER_HLIB
SQL_DRIVER_HSTMTSQL_DRIVER_NAME
SQL_DRIVER_ODBC_VERSQL_DRIVER_VER
SQL_FETCH_DIRECTIONSQL_FILE_USAGE
SQL_GETDATA_EXTENSIONSSQL_LOCK_TYPES
SQL_ODBC_API_CONFORMANCESQL_ODBC_SAG_CLI_CONFORMANCE
SQL_ODBC_VERSQL_POS_OPERATIONS
SQL_ROW_UPDATESSQL_SEARCH_PATTERN_ESCAPE

SQL_SERVER_NAME

DBMS Product Information

The following values of fInfoType return information about the DBMS product, such as the DBMS name and version:

SQL_DATABASE_NAME

SQL_DBMS_NAME

SQL_DBMS_VER.

Data Source Information

The following values of fInfoType return information about the data source, such as cursor characteristics and transaction capabilities:

SQL_ACCESSIBLE_PROCEDURESSQL_ACCESSIBLE_TABLES
SQL_BOOKMARK_PERSISTENCESQL_CONCAT_NULL_BEHAVIOR
SQL_CURSOR_COMMIT_BEHAVIORSQL_CURSOR_ROLLBACK_BEHAVIOR
SQL_DATA_SOURCE_READ_ONLYSQL_DEFAULT_TXN_ISOLATION
SQL_MULT_RESULT_SETSSQL_MULTIPLE_ACTIVE_TXN
SQL_NEED_LONG_DATA_LENSQL_NULL_COLLATION
SQL_OWNER_TERMSQL_PROCEDURE_TERM
SQL_QUALIFIER_TERMSQL_SCROLL_CONCURRENCY
SQL_SCROLL_OPTIONSSQL_STATIC_SENSITIVITY
SQL_TABLE_TERMSQL_TXN_CAPABLE
SQL_TXN_ISOLATION_OPTIONSQL_USER_NAME

Supported SQL

The following values of fInfoType return information about the SQL statements supported by the data source. These information types do not exhaustively describe the entire ODBC SQL grammar. Instead, they describe those parts of the grammar for which data sources commonly offer different levels of support.

Applications should determine the general level of supported grammar from the SQL_ODBC_SQL_CONFORMANCE information type and use the other information types to determine variations from the stated conformance level.

SQL_ALTER_TABLESQL_COLUMN_ALIAS
SQL_CORRELATION_NAMESQL_EXPRESSIONS_IN_ORDERBY
SQL_GROUP_BYSQL_IDENTIFIER_CASE
SQL_IDENTIFIER_QUOTE_CHARSQL_KEYWORDS
SQL_LIKE_ESCAPE_CLAUSESQL_NON_NULLABLE_COLUMNS
SQL_ODBC_SQL_CONFORMANCESQL_ODBC_SQL_OPT_IEF
SQL_ORDER_BY_COLUMNS_IN_SELECTSQL_OUTER_JOINS
SQL_OWNER_USAGESQL_POSITIONED_STATEMENTS
SQL_PROCEDURESSQL_QUALIFIER_LOCATION
SQL_QUALIFIER_NAME_SEPARATORSQL_QUALIFIER_USAGE
SQL_QUOTED_IDENTIFIER_CASESQL_SPECIAL_CHARACTERS
SQL_SUBQUERIESSQL_UNION

SQL Limits

The following values of fInfoType return information about the limits applied to identifiers and clauses in SQL statements, such as the maximum lengths of identifiers and the maximum number of columns in a select list. Limitations may be imposed by either the driver or the data source.

SQL_MAX_BINARY_LITERAL_LENSQL_MAX_CHAR_LITERAL_LEN
SQL_MAX_COLUMN_NAME_LENSQL_MAX_COLUMNS_IN_GROUP_BY
SQL_MAX_COLUMNS_IN_ORDER_BYSQL_MAX_COLUMNS_IN_INDEX
SQL_MAX_COLUMNS_IN_SELECTSQL_MAX_COLUMNS_IN_TABLE
SQL_MAX_CURSOR_NAME_LENSQL_MAX_INDEX_SIZE
SQL_MAX_OWNER_NAME_LENSQL_MAX_PROCEDURE_NAME_LEN
SQL_MAX_QUALIFIER_NAME_LENSQL_MAX_ROW_SIZE
SQL_MAX_ROW_SIZE_INCLUDES_LONGSQL_MAX_STATEMENT_LEN
SQL_MAX_TABLE_NAME_LENSQL_MAX_TABLES_IN_SELECT

SQL_MAX_USER_NAME_LEN

Scalar Function Information

The following values of fInfoType return information about the scalar functions supported by the data source and the driver. For more information about scalar functions, see Appendix F, Scalar Functions.

SQL_CONVERT_FUNCTIONS

SQL_NUMERIC_FUNCTIONS

SQL_STRING_FUNCTIONS

SQL_SYSTEM_FUNCTIONS

SQL_TIMEDATE_ADD_INTERVALS

SQL_TIMEDATE_DIFF_INTERVALS

SQL_TIMEDATE_FUNCTIONS

Conversion Information

The following values of fInfoType return a list of the SQL data types to which the data source can convert the specified SQL data type with the CONVERT scalar function.

SQL_CONVERT_BIGINTSQL_CONVERT_BINARY
SQL_CONVERT_BITSQL_CONVERT_CHAR
SQL_CONVERT_DATESQL_CONVERT_DECIMAL
SQL_CONVERT_DOUBLESQL_CONVERT_FLOAT
SQL_CONVERT_INTEGERSQL_CONVERT_LONGVARBINARY
SQL_CONVERT_LONGVARCHARSQL_CONVERT_NUMERIC
SQL_CONVERT_REALSQL_CONVERT_SMALLINT
SQL_CONVERT_TIMESQL_CONVERT_TIMESTAMP
SQL_CONVERT_TINYINTSQL_CONVERT_VARBINARY
SQL_CONVERT_VARCHAR

Information Type Descriptions

This section lists each information type alphabetically, as well as the version of ODBC in which it was introduced and its description.

 SQL_ACCESSIBLE_PROCEDURES (ODBC 1.0)

A character string: "Y" if the user can execute all procedures returned by SQLProcedures; "N" if there may be procedures returned that the user cannot execute.

 SQL_ACCESSIBLE_TABLES (ODBC 1.0)

A character string: "Y" if the user is guaranteed SELECT privileges to all tables returned by SQLtables; "N" if there may be tables returned that the user cannot access.

 SQL_ACTIVE_CONNECTIONS (ODBC 1.0)

A 16-bit integer value specifying the maximum number of active hdbcs that the driver can support. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_ACTIVE_STATEMENTS (ODBC 1.0)

A 16-bit integer value specifying the maximum number of active hstmts that the driver can support for an hdbc. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero.

SQL_ALTER_TABLE (ODBC 2.0)

A 32-bit bitmask enumerating the clauses in the ALTER TABLE statement supported by the data source. The following bitmask is used to determine which clauses are supported: SQL_AT_ADD_COLUMNSQL_AT_DROP_COLUMN.

SQL_BOOKMARK_PERSISTENCE (ODBC 2.0)

A 32-bit bitmask enumerating the operations through which bookmarks persist. The following bitmasks are used in conjunction with the flag to determine through which options bookmarks persist: SQL_BP_CLOSE = Bookmarks are valid after an application calls SQLFreeStmt with the SQL_CLOSE option to close the cursor associated with an hstmt.

SQL_BP_DELETE = The bookmark for a row is valid after that row has been deleted.

SQL_BP_DROP = Bookmarks are valid after an hstmt an application calls SQLFreeStmt with the SQL_DROP option to drop an hstmt.

SQL_BP_SCROLL = Bookmarks are valid after any scrolling operation (call to SQLExtendedFetch). Because all bookmarks must remain valid after SQLExtendedFetch is called, this value can be used by applications to determine whether bookmarks are supported.

SQL_BP_TRANSACTION = Bookmarks are valid after an application commits or rolls back a transaction.

SQL_BP_UPDATE = The bookmark for a row is valid after any column in that row has been updated, including key columns.

SQL_BP_OTHER_HSTMT = A bookmark associated with one hstmt can be used with another hstmt.

SQL_COLUMN_ALIAS (ODBC 2.0)

A character string: "Y" if the data source supports column aliases; otherwise, "N".

 SQL_CONCAT_NULL_BEHAVIOR (ODBC 1.0)

A 16-bit integer value indicating how the data source handles the concatenation of NULL valued character data type columns with non-NULL valued character data type columns:

SQL_CB_NULL = Result is NULL valued.

SQL_CB_NON_NULL = Result is concatenation of non-NULL valued column or columns.

<FONT FACE="Geneva,Arial" SIZE=2">&#149;FONT> SQL_CONVERT_BIGINTSQL_CONVERT_LONGVARCHAR
SQL_CONVERT_BINARYSQL_CONVERT_NUMERIC
SQL_CONVERT_BITSQL_CONVERT_REAL
SQL_CONVERT_CHARSQL_CONVERT_SMALLINT
SQL_CONVERT_DATESQL_CONVERT_TIME
SQL_CONVERT_DECIMALSQL_CONVERT_TIMESTAMP
SQL_CONVERT_DOUBLESQL_CONVERT_TINYINT
SQL_CONVERT_FLOATSQL_CONVERT_VARBINARY
SQL_CONVERT_INTEGERSQL_CONVERT_VARCHAR
SQL_CONVERT_LONGVARBINARY

(ODBC 1.0)

A 32-bit bitmask. The bitmask indicates the conversions supported by the data source with the CONVERT scalar function for data of the type named in the fInfoType. If the bitmask equals zero, the data source does not support any conversions for data of the named type, including conversion to the same data type.

For example, to find out if a data source supports the conversion of SQL_INTEGER data to the SQL_BIGINT data type, an application calls SQLGetInfo with the fInfoType of SQL_CONVERT_INTEGER. The application ANDs the returned bitmask with SQL_CVT_BIGINT. If the resulting value is nonzero, the conversion is supported.

The following bitmasks are used to determine which conversions are supported:

SQL_CVT_BIGINTSQL_CVT_LONGVARCHAR
SQL_CVT_BINARYSQL_CVT_NUMERICS
SQL_CVT_BITSQL_CVT_REAL
SQL_CVT_CHARSQL_CVT_SMALLINT
SQL_CVT_DATSQL_CVT_TIME
SQL_CVT_DECIMALSQL_CVT_TIMESTAMP
SQL_CVT_DOUBLESQL_CVT_TINYINT
SQL_CVT_FLOATSQL_CVT_VARBINARY
SQL_CVT_INTEGERSQL_CVT_VARCHAR

SQL_CVT_LONGVARBINARY

 SQL_CONVERT_FUNCTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scalar conversion functions supported by the driver and the associated data source. The following bitmask is used to determine which conversion functions are supported: SQL_FN_CVT_CONVERT

 SQL_CORRELATION_NAME (ODBC 1.0)

A 16-bit integer indicating whether table correlation names are supported:

SQL_CN_NONE = Correlation names are not supported.

SQL_CN_DIFFERENT = Correlation names are supported, but must differ from the names of the tables they represent.

SQL_CN_ANY = Correlation names are supported and can be any valid user-defined name.

SQL_CURSOR_COMMIT_BEHAVIOR (ODBC 1.0)

A 16-bit integer value indicating how a COMMIT operation affects cursors and prepared statements in the data source:

SQL_CB_DELETE = Close cursors and delete prepared statements. To use the cursor again, the application must again prepare and execute the hstmt.

SQL_CB_CLOSE = Close cursors. For prepared statements, the application can call SQLExecute on the hstmt without calling SQLPrepare again.

SQL_CB_PRESERVE = Preserve cursors in the same position as before the COMMIT operation. The application can continue to fetch data or it can close the cursor and execute the hstmt again without having to prepare it again.

 SQL_CURSOR_ROLLBACK_BEHAVIOR (ODBC 1.0)

A 16-bit integer value indicating how a ROLLBACK operation affects cursors and prepared statements in the data source:

SQL_CB_DELETE = Close cursors and delete prepared statements. To use the cursor again, the application must again prepare and execute the hstmt.

SQL_CB_CLOSE = Close cursors. For prepared statements, the application can call SQLExecute on the hstmt without calling SQLPrepare again.

SQL_CB_PRESERVE = Preserve cursors in the same position as before the ROLLBACK operation. The application can continue to fetch data or it can close the cursor and execute the hstmt again without having to prepare it again.

SQL_DATA_SOURCE_NAME (ODBC 1.0)

A character string with the data source name used during connection. If the application called SQLConnect, this is the value of the szDSN argument. If the application called SQLDriverConnect or SQLBrowseConnect, this is the value of the DSN keyword in the connection string passed to the driver. If the connection string did not contain the DSN keyword (such as when it contains the DRIVER keyword), this is an empty string.

 SQL_DATA_SOURCE_READ_ONLY (ODBC 1.0)

A character string: "Y" if the data source is set to READ ONLY mode; "N" if it is otherwise. This characteristic pertains only to the data source itself; it is not a characteristic of the driver that enables access to the data source.

 SQL_DATABASE_NAME (ODBC 1.0)

A character string with the name of the current database in use, if the data source defines a named object called "database."

Note: In ODBC 2.0, this value of fInfoType has been replaced by the SQL_CURRENT_QUALIFIER connection option. ODBC 2.0 drivers should continue to support the SQL_DATABASE_NAME information type, and ODBC 2.0 applications should only use it with ODBC 1.0 drivers.

SQL_DBMS_NAME (ODBC 1.0)

A character string with the name of the DBMS product accessed by the driver.

SQL_DBMS_VER (ODBC 1.0)

A character string indicating the version of the DBMS product accessed by the driver. The version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version. The driver must render the DBMS product version in this form, but can also append the DBMS product-specific version as well. For example, "04.01.0000 Rdb 4.1".

 SQL_DEFAULT_TXN_ISOLATION (ODBC 1.0)

A 32-bit integer that indicates the default transaction isolation level supported by the driver or data source, or zero if the data source does not support transactions. The following terms are used to define transaction isolation levels:

Dirty Read - Transaction 1 changes a row. Transaction 2 reads the changed row before transaction 1 commits the change. If transaction 1 rolls back the change, transaction 2 will have read a row that is considered to have never existed.

Nonrepeatable Read - Transaction 1 reads a row. Transaction 2 updates or deletes that row and commits this change. If transaction 1 attempts to reread the row, it will receive different row values or discover that the row has been deleted.

Phantom - Transaction 1 reads a set of rows that satisfy some search criteria. Transaction 2 inserts a row that matches the search criteria. If transaction 1 again executes the statement that read the rows, it receives a different set of rows. If the data source supports transactions, the driver returns one of the following bitmasks:

SQL_TXN_READ_UNCOMMITTED = Dirty reads, nonrepeatable reads, and phantoms are possible.

SQL_TXN_READ_COMMITTED = Dirty reads are not possible. Nonrepeatable reads and phantoms are possible.

SQL_TXN_REPEATABLE_READ = Dirty reads and nonrepeatable reads are not possible. Phantoms are possible.

SQL_TXN_SERIALIZABLE = Transactions are serializable. Dirty reads, nonrepeatable reads, and phantoms are not possible.

SQL_TXN_VERSIONING = Transactions are serializable, but higher concurrency is possible than with SQL_TXN_SERIALIZABLE. Dirty reads are not possible. Typically, SQL_TXN_SERIALIZABLE is implemented by using locking protocols that reduce concurrency and SQL_TXN_VERSIONING is implemented by using a non-locking protocol such as record versioning. Oracle's Read Consistency isolation level is an example of SQL_TXN_VERSIONING.

 SQL_DRIVER_HDBCSQL_DRIVER_HENV (ODBC 1.0)

A 32-bit value, the driver's environment handle or connection handle, determined by the argument hdbc. These information types are implemented by the Driver Manager alone.

 SQL_DRIVER_HLIB (ODBC 2.0)

A 32-bit value, the library handle returned to the Driver Manager when it loaded the driver DLL. The handle is only valid for the hdbc specified in the call to SQLGetInfo. This information type is implemented by the Driver Manager alone.

SQL_DRIVER_HSTMT (ODBC 1.0)

A 32-bit value, the driver's statement handle determined by the Driver Manager statement handle, which is passed on input in rgbInfoValue from the application. Note that in this case, rgbInfoValue is both an input and an output argument. The input hstmt passed in rgbInfoValue must have been an hstmt allocated on the hdbc argument. This information type is implemented by the Driver Manager alone.

 SQL_DRIVER_NAME (ODBC 1.0)

A character string with the filename of the driver used to access the data source.

SQL_DRIVER_ODBC_VER (ODBC 2.0)

A character string with the version of ODBC that the driver supports. The version is of the form ##.##, where the first two digits are the major version and the next two digits are the minor version. SQL_SPEC_MAJOR and SQL_SPEC_MINOR define the major and minor version numbers. For the version of ODBC described in this manual, these are 2 and 0, and the driver should return "02.00". If a driver supports SQLGetInfo but does not support this value of the fInfoType argument, the Driver Manager returns "01.00".

 SQL_DRIVER_VER (ODBC 1.0)

A character string with the version of the driver and, optionally, a description of the driver. At a minimum, the version is of the form ##.##.####, where the first two digits are the major version, the next two are the minor version and the last four are the release version.

SQL_EXPRESSIONS_IN_ORDERBY (ODBC 1.0)

A character string: "Y" if the data source supports expressions in the ORDER BY list; "N" if it does not.

 SQL_FETCH_DIRECTION (ODBC 1.0)

A 32-bit bitmask enumerating the supported fetch direction options. The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced. The following bitmasks are used in conjunction with the flag to determine which options are supported:

BitmaskVersion
SQL_FD_FETCH_NEXTODBC 1.0
SQL_FD_FETCH_FIRSTODBC 1.0
SQL_FD_FETCH_LASTODBC 1.0
SQL_FD_FETCH_PRIORODBC 1.0
SQL_FD_FETCH_ABSOLUTEODBC 1.0
SQL_FD_FETCH_RELATIVEODBC 1.0
SQL_FD_FETCH_RESUMEODBC 1.0
SQL_FD_FETCH_BOOKMARKODBC 2.0

 SQL_FILE_USAGE (ODBC 2.0)

A 16-bit integer value indicating how a single-tier driver directly treats files in a data source:

SQL_FILE_NOT_SUPPORTED = The driver is not a single-tier driver. For example, an ORACLE driver is a two-tier driver.

SQL_FILE_TABLE = A single-tier driver treats files in a data source as tables. For example, an Xbase driver treats each Xbase file as a table.

SQL_FILE_QUALIFIER = A single-tier driver treats files in a data source as a qualifier. For example, a Microsoft Access driver treats each Microsoft Access file as a complete database. An application can use this to determine how users will select data. For example, Xbase users often think of data as stored in files, while ORACLE and Microsoft Access users generally think of data as stored in tables. When a user selects an Xbase data source, the application could display the Windows File Open common dialog box; when the user selects a Microsoft Access or ORACLE data source, the application could display a custom Select Table dialog box.

 SQL_GETDATA_EXTENSIONS (ODBC 2.0)

A 32-bit bitmask enumerating extensions to SQLGetData. The following bitmasks are used in conjunction with the flag to determine what common extensions the driver supports for SQLGetData: SQL_GD_ANY_COLUMN = SQLGetData can be called for any unbound column, including those before the last bound column. Note that the columns must be called in order of ascending column number unless SQL_GD_ANY_ORDER is also returned.

SQL_GD_ANY_ORDER = SQLGetData can be called for unbound columns in any order. Note that SQLGetData can only be called for columns after the last bound column unless SQL_GD_ANY_COLUMN is also returned.

SQL_GD_BLOCK = SQLGetData can be called for an unbound column in any row in a block (more than one row) of data after positioning to that row with SQLSetPos.

SQL_GD_BOUND = SQLGetData can be called for bound columns as well as unbound columns. A driver cannot return this value unless it also returns SQL_GD_ANY_COLUMN.

SQLGetData is only required to return data from unbound columns that occur after the last bound column, are called in order of increasing column number, and are not in a row within a block of rows.

 SQL_GROUP_BY (ODBC 2.0)

A 16-bit integer value specifying the relationship between the columns in the GROUP BY clause and the non-aggregated columns in the select list:

SQL_GB_NOT_SUPPORTED = GROUP BY clauses are not supported.

SQL_GB_GROUP_BY_EQUALS_SELECT = The GROUP BY clause must contain all non-aggregated columns in the select list. It cannot contain any other columns. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT.

SQL_GB_GROUP_BY_CONTAINS_SELECT = The GROUP BY clause must contain all non-aggregated columns in the select list. It can contain columns that are not in the select list. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT, AGE.

SQL_GB_NO_RELATION = The columns in the GROUP BY clause and the select list are not related. The meaning of non-grouped, non-aggregated columns in the select list is data source-dependent. For example, SELECT DEPT, SALARY FROM EMPLOYEE GROUP BY DEPT, AGE.

 SQL_IDENTIFIER_CASE (ODBC 1.0)

A 16-bit integer value as follows:

SQL_IC_UPPER = Identifiers in SQL are case insensitive and are stored in upper case in the system catalog.

SQL_IC_LOWER = Identifiers in SQL are case insensitive and are stored in lower case in the system catalog.

SQL_IC_SENSITIVE = Identifiers in SQL are case sensitive and are stored in mixed case in the system catalog.

SQL_IC_MIXED = Identifiers in SQL are case insensitive and are stored in mixed case in the system catalog.

 SQL_IDENTIFIER_QUOTE_CHAR (ODBC 1.0)

The character string used as the starting and ending delimiter of quoted (delimited) identifiers in SQL statements. (Identifiers passed as arguments to ODBC functions do not need to be quoted.) If the data source does not support quoted identifiers, a blank is returned.

 SQL_KEYWORDS (ODBC 2.0)

A character string containing a comma-separated list of all data source-specific keywords. This list does not contain keywords specific to ODBC or keywords used by both the data source and ODBC. For a list of ODBC keywords, see the List of Reserved Keywords in Appendix C, "SQL Grammar." The #define value SQL_ODBC_KEYWORDS contains a comma-separated list of ODBC keywords.

SQL_LIKE_ESCAPE_CLAUSE (ODBC 2.0)

A character string: "Y" if the data source supports an escape character for the percent character (%) and underscore character (_) in a LIKE predicate and the driver supports the ODBC syntax for defining a LIKE predicate escape character; otherwise, "N".

 SQL_LOCK_TYPES (ODBC 2.0)

A 32-bit bitmask enumerating the supported lock types for the fLock argument in SQLSetPos. The following bitmasks are used in conjunction with the flag to determine which lock types are supported:

SQL_LCK_NO_CHANGE

SQL_LCK_EXCLUSIVE

SQL_LCK_UNLOCK.

 SQL_MAX_BINARY_LITERAL_LEN (ODBC 2.0)

A 32-bit integer value specifying the maximum length (number of hexadecimal characters, excluding the literal prefix and suffix returned by SQLGetTypeInfo) of a binary literal in an SQL statement. For example, the binary literal 0xFFAA has a length of 4. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_CHAR_LITERAL_LEN (ODBC 2.0)

A 32-bit integer value specifying the maximum length (number of characters, excluding the literal prefix and suffix returned by SQLGetTypeInfo) of a character literal in an SQL statement. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_COLUMN_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of a column name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_COLUMNS_IN_GROUP_BY (ODBC 2.0)

A 16-bit integer value specifying the maximum number of columns allowed in a GROUP BY clause. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_COLUMNS_IN_INDEX (ODBC 2.0)

A 16-bit integer value specifying the maximum number of columns allowed in an index. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_COLUMNS_IN_ORDER_BY (ODBC 2.0)

A 16-bit integer value specifying the maximum number of columns allowed in an ORDER BY clause. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_COLUMNS_IN_SELECT (ODBC 2.0)

A 16-bit integer value specifying the maximum number of columns allowed in a select list. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_COLUMNS_IN_TABLE (ODBC 2.0)

A 16-bit integer value specifying the maximum number of columns allowed in a table. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_CURSOR_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of a cursor name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_INDEX_SIZE (ODBC 2.0)

A 32-bit integer value specifying the maximum number of bytes allowed in the combined fields of an index. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_OWNER_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of an owner name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_PROCEDURE_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of a procedure name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

SQL_MAX_QUALIFIER_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of a qualifier name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

SQL_MAX_ROW_SIZE (ODBC 2.0)

A 32-bit integer value specifying the maximum length of a single row in a table. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_ROW_SIZE_INCLUDES_LONG (ODBC 2.0)

A character string: "Y" if the maximum row size returned for the SQL_MAX_ROW_SIZE information type includes the length of all SQL_LONGVARCHAR and SQL_LONGVARBINARY columns in the row; otherwise, "N".

 SQL_MAX_STATEMENT_LEN (ODBC 2.0)

A 32-bit integer value specifying the maximum length (number of characters, including white space) of an SQL statement. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_TABLE_NAME_LEN (ODBC 1.0)

A 16-bit integer value specifying the maximum length of a table name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

 SQL_MAX_TABLES_IN_SELECT (ODBC 2.0)

A 16-bit integer value specifying the maximum number of tables allowed in the FROM clause of a SELECT statement. If there is no specified limit or the limit is unknown, this value is set to zero.

 SQL_MAX_USER_NAME_LEN (ODBC 2.0)

A 16-bit integer value specifying the maximum length of a user name in the data source. If there is no maximum length or the length is unknown, this value is set to zero.

SQL_MULT_RESULT_SETS (ODBC 1.0)

A character string: "Y" if the data source supports multiple result sets; "N" if it does not.

 SQL_MULTIPLE_ACTIVE_TXN (ODBC 1.0)

A character string: "Y" if active transactions on multiple connections are allowed; "N" if only one connection at a time can have an active transaction.

SQL_NEED_LONG_DATA_LEN (ODBC 2.0)

A character string: "Y" if the data source needs the length of a long data value (the data type is SQL_LONGVARCHAR, SQL_LONGVARBINARY, or a long, data source-specific data type) before that value is sent to the data source; "N" if it does not. For more information, see SQLBindParameter and SQLSetPos.

 SQL_NON_NULLABLE_COLUMNS (ODBC 1.0)

A 16-bit integer specifying whether the data source supports non-nullable columns:

SQL_NNC_NULL = All columns must be nullable.

SQL_NNC_NON_NULL = Columns may be non-nullable (the data source supports the NOT NULL column constraint in CREATE TABLE statements).

 SQL_NULL_COLLATION (ODBC 2.0)

A 16-bit integer value specifying where NULLs are sorted in a list:

SQL_NC_END = NULLs are sorted at the end of the list, regardless of the sort order.

SQL_NC_HIGH = NULLs are sorted at the high end of the list.

SQL_NC_LOW = NULLs are sorted at the low end of the list.

SQL_NC_START = NULLs are sorted at the start of the list, regardless of the sort order.

SQL_NUMERIC_FUNCTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scalar numeric functions supported by the driver and the associated data source. The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced. The following bitmasks are used to determine which numeric functions are supported:

BitmaskVersion
SQL_FN_NUM_ABS ODBC 1.0
SQL_FN_NUM_ACOS ODBC 1.0
SQL_FN_NUM_ASIN ODBC 1.0
SQL_FN_NUM_ATAN ODBC 1.0
SQL_FN_NUM_ATAN2 ODBC 1.0
SQL_FN_NUM_CEILINGODBC 1.0
SQL_FN_NUM_COSODBC 1.0
SQL_FN_NUM_COTODBC 1.0
SQL_FN_NUM_DEGREESODBC 2.0
SQL_FN_NUM_EXPODBC 1.0
SQL_FN_NUM_FLOORODBC 1.0
SQL_FN_NUM_LOGODBC 1.0
SQL_FN_NUM_LOG10ODBC 2.0
SQL_FN_NUM_MODODBC 1.0
SQL_FN_NUM_PIODBC 1.0
SQL_FN_NUM_POWERODBC 2.0
SQL_FN_NUM_RADIANSODBC 2.0
SQL_FN_NUM_RANDODBC 1.0
SQL_FN_NUM_ROUNDODBC 2.0
SQL_FN_NUM_SIGNODBC 1.0
SQL_FN_NUM_SINODBC 1.0
SQL_FN_NUM_SQRTODBC 1.0
SQL_FN_NUM_TANODBC 1.0
SQL_FN_NUM_TRUNCATEODBC 2.0

 SQL_ODBC_API_CONFORMANCE (ODBC 1.0)

A 16-bit integer value indicating the level of ODBC conformance:

SQL_OAC_NONE = None

SQL_OAC_LEVEL1 = Level 1 supported

SQL_OAC_LEVEL2 = Level 2 supported.

(For a list of functions and conformance levels, see Chapter 21, Function Summary.)

SQL_ODBC_SAG_CLI_CONFORMANCE (ODBC 1.0)

A 16-bit integer value indicating compliance to the functions of the SAG specification:

SQL_OSCC_NOT_COMPLIANT = Not SAG-compliant; one or more core functions are not supported

SQL_OSCC_COMPLIANT = SAG-compliant.

 SQL_ODBC_SQL_CONFORMANCE (ODBC 1.0)

A 16-bit integer value indicating SQL grammar supported by the driver:

SQL_OSC_MINIMUM = Minimum grammar supported

SQL_OSC_CORE = Core grammar supported

SQL_OSC_EXTENDED = Extended grammar supported.

 SQL_ODBC_SQL_OPT_IEF (ODBC 1.0)

A character string: "Y" if the data source supports the optional Integrity Enhancement Facility; "N" if it does not.

 SQL_ODBC_VER (ODBC 1.0)

A character string with the version of ODBC to which the Driver Manager conforms. The version is of the form ##.##, where the first two digits are the major version and the next two digits are the minor version. This is implemented solely in the Driver Manager.

 SQL_ORDER_BY_COLUMNS_IN_SELECT (ODBC 2.0)

A character string: "Y" if the columns in the ORDER BY clause must be in the select list; otherwise, "N".

 SQL_OUTER_JOINS (ODBC 1.0)

The information type was introduced in ODBC 1.0; each return value is labeled with the version in which it was introduced.

A character string: "N" = No. The data source does not support outer joins. (ODBC 1.0)

"Y" = Yes. The data source supports two-table outer joins, and the driver supports the ODBC outer join syntax except for nested outer joins. However, columns on the left side of the comparison operator in the ON clause must come from the left-hand table in the outer join, and columns on the right side of the comparison operator must come from the right-hand table. (ODBC 1.0)

"P" = Partial. The data source partially supports nested outer joins, and the driver supports the ODBC outer join syntax. However, columns on the left side of the comparison operator in the ON clause must come from the left-hand table in the outer join and columns on the right side of the comparison operator must come from the right-hand table. Also, the right-hand table of an outer join cannot be included in an inner join. (ODBC 2.0)

"F" = Full. The data source fully supports nested outer joins, and the driver supports the ODBC outer join syntax. (ODBC 2.0)

 SQL_OWNER_TERM (ODBC 1.0)

A character string with the data source vendor's name for an owner; for example, "owner", "Authorization ID", or "Schema".

 SQL_OWNER_USAGE (ODBC 2.0)

A 32-bit bitmask enumerating the statements in which owners can be used:

SQL_OU_DML_STATEMENTS = Owners are supported in all Data Manipulation Language statements: SELECT, INSERT, UPDATE, DELETE, and, if supported, SELECT FOR UPDATE and positioned update and delete statements.

SQL_OU_PROCEDURE_INVOCATION = Owners are supported in the ODBC procedure invocation statement.

SQL_OU_TABLE_DEFINITION = Owners are supported in all table definition statements: CREATE TABLE, CREATE VIEW, ALTER TABLE, DROP TABLE, and DROP VIEW.

SQL_OU_INDEX_DEFINITION = Owners are supported in all index definition statements: CREATE INDEX and DROP INDEX.

SQL_OU_PRIVILEGE_DEFINITION = Owners are supported in all privilege definition statements: GRANT and REVOKE.

 SQL_POS_OPERATIONS (ODBC 2.0)

A 32-bit bitmask enumerating the supported operations in SQLSetPos. The following bitmasks are used in conjunction with the flag to determine which options are supported:

SQL_POS_POSITION

SQL_POS_REFRESH

SQL_POS_UPDATE

SQL_POS_DELETE

SQL_POS_ADD.

 SQL_POSITIONED_STATEMENTS (ODBC 2.0)

A 32-bit bitmask enumerating the supported positioned SQL statements. The following bitmasks are used to determine which statements are supported:

SQL_PS_POSITIONED_DELETE

SQL_PS_POSITIONED_UPDATE

SQL_PS_SELECT_FOR_UPDATE.

 SQL_PROCEDURE_TERM (ODBC 1.0)

A character string with the data source vendor's name for a procedure; for example, "database procedure", "stored procedure", or "procedure".

 SQL_PROCEDURES (ODBC 1.0)

A character string: "Y" if the data source supports procedures and the driver supports the ODBC procedure invocation syntax; otherwise, "N".

 SQL_QUALIFIER_LOCATION (ODBC 2.0)

A 16-bit integer value indicating the position of the qualifier in a qualified table name:

SQL_QL_START

SQL_QL_END.

For example, an Xbase driver returns SQL_QL_START because the directory (qualifier) name is at the start of the table name, as in \EMPDATA\EMP.DBF. An ORACLE Server driver returns SQL_QL_END, because the qualifier is at the end of the table name, as in ADMIN.EMP@EMPDATA.

 SQL_QUALIFIER_NAME_SEPARATOR (ODBC 1.0)

A character string: the character or characters that the data source defines as the separator between a qualifier name and the qualified name element that follows it.

 SQL_QUALIFIER_TERM (ODBC 1.0)

A character string with the data source vendor's name for a qualifier; for example, "database" or "directory".

 SQL_QUALIFIER_USAGE (ODBC 2.0)

A 32-bit bitmask enumerating the statements in which qualifiers can be used.The following bitmasks are used to determine where qualifiers can be used:

SQL_QU_DML_STATEMENTS = Qualifiers are supported in all Data Manipulation Language statements: SELECT, INSERT, UPDATE, DELETE, and, if supported, SELECT FOR UPDATE and positioned update and delete statements.

SQL_QU_PROCEDURE_INVOCATION = Qualifiers are supported in the ODBC procedure invocation statement.

SQL_QU_TABLE_DEFINITION = Qualifiers are supported in all table definition statements: CREATE TABLE, CREATE VIEW, ALTER TABLE, DROP TABLE, and DROP VIEW.

SQL_QU_INDEX_DEFINITION = Qualifiers are supported in all index definition statements: CREATE INDEX and DROP INDEX.

SQL_QU_PRIVILEGE_DEFINITION = Qualifiers are supported in all privilege definition statements: GRANT and REVOKE.

 SQL_QUOTED_IDENTIFIER_CASE (ODBC 2.0)

A 16-bit integer value as follows:

SQL_IC_UPPER = Quoted identifiers in SQL are case insensitive and are stored in upper case in the system catalog.

SQL_IC_LOWER = Quoted identifiers in SQL are case insensitive and are stored in lower case in the system catalog.

SQL_IC_SENSITIVE = Quoted identifiers in SQL are case sensitive and are stored in mixed case in the system catalog.

SQL_IC_MIXED = Quoted identifiers in SQL are case insensitive and are stored in mixed case in the system catalog.

 SQL_ROW_UPDATES (ODBC 1.0)

A character string: "Y" if a keyset-driven or mixed cursor maintains row versions or values for all fetched rows and therefore can detect any changes made to a row by any user since the row was last fetched; otherwise, "N".

 SQL_SCROLL_CONCURRENCY (ODBC 1.0)

A 32-bit bitmask enumerating the concurrency control options supported for scrollable cursors. The following bitmasks are used to determine which options are supported:

SQL_SCCO_READ_ONLY = Cursor is read only. No updates are allowed.

SQL_SCCO_LOCK = Cursor uses the lowest level of locking sufficient to ensure that the row can be updated.

SQL_SCCO_OPT_ROWVER = Cursor uses optimistic concurrency control, comparing row versions, such as SQLBaseÆ ROWID or Sybase TIMESTAMP.

SQL_SCCO_OPT_VALUES = Cursor uses optimistic concurrency control, comparing values. For information about cursor concurrency, see Specifying Cursor Concurrency in Chapter 7, "Retrieving Results."

SQL_SCROLL_OPTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scroll options supported for scrollable cursors. The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced. The following bitmasks are used to determine which options are supported:

SQL_SO_FORWARD_ONLY = The cursor only scrolls forward. (ODBC 1.0)

SQL_SO_STATIC = The data in the result set is static. (ODBC 2.0)

SQL_SO_KEYSET_DRIVEN = The driver saves and uses the keys for every row in the result set. (ODBC 1.0)

SQL_SO_DYNAMIC = The driver keeps the keys for every row in the rowset (the keyset size is the same as the rowset size). (ODBC 1.0)

SQL_SO_MIXED = The driver keeps the keys for every row in the keyset, and the keyset size is greater than the rowset size. The cursor is keyset-driven inside the keyset and dynamic outside the keyset. (ODBC 1.0)

For information about scrollable cursors, see Scrollable Cursors in Chapter 7, "Retrieving Results."

 SQL_SEARCH_PATTERN_ESCAPE (ODBC 1.0)

A character string specifying what the driver supports as an escape character that permits the use of the pattern match metacharacters underscore (_) and percent (%) as valid characters in search patterns. This escape character applies only for those catalog function arguments that support search strings. If this string is empty, the driver does not support a search-pattern escape character. This fInfoType is limited to catalog functions. For a description of the use of the escape character in search pattern strings, see Search Pattern Arguments earlier in this chapter.

 SQL_SERVER_NAME (ODBC 1.0)

A character string with the actual data source-specific server name; useful when a data source name is used during SQLConnect, SQLDriverConnect, and SQLBrowseConnect.

SQL_SPECIAL_CHARACTERS (ODBC 2.0)

A character string containing all special characters (that is, all characters except a through z, A through Z, 0 through 9, and underscore) that can be used in an object name, such as a table, column, or index name, on the data source. For example, "#$^".

 SQL_STATIC_SENSITIVITY (ODBC 2.0)

A 32-bit bitmask enumerating whether changes made by an application to a static or keyset-driven cursor through SQLSetPos or positioned update or delete statements can be detected by that application:

SQL_SS_ADDITIONS = Added rows are visible to the cursor; the cursor can scroll to these rows. Where these rows are added to the cursor is driver-dependent.

SQL_SS_DELETIONS = Deleted rows are no longer available to the cursor and do not leave a "hole" in the result set; after the cursor scrolls from a deleted row, it cannot return to that row.

SQL_SS_UPDATES = Updates to rows are visible to the cursor; if the cursor scrolls from and returns to an updated row, the data returned by the cursor is the updated data, not the original data. Because updating key values in a keyset-driven cursor is considered to be deleting the existing row and adding a new row, this value is always returned for keyset-driven cursors. Whether an application can detect changes made to the result set by other users, including other cursors in the same application, depends on the cursor type. For more information, see Scrollable Cursors in Chapter 7, "Retrieving Results."

 SQL_STRING_FUNCTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scalar string functions supported by the driver and the associated data source. The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced. The following bitmasks are used to determine which string functions are supported:

SQL_FN_STR_ASCIIODBC 1.0
SQL_FN_STR_CHARODBC 1.0
SQL_FN_STR_CONCATODBC 1.0
SQL_FN_STR_DIFFERENCEODBC 2.0
SQL_FN_STR_INSERTODBC 1.0
SQL_FN_STR_LCASEODBC 1.0
SQL_FN_STR_LEFTODBC 1.0
SQL_FN_STR_LENGTHODBC 1.0
SQL_FN_STR_LOCATEODBC 1.0
SQL_FN_STR_LOCATE_2ODBC 2.0
SQL_FN_STR_LTRIMODBC 1.0
SQL_FN_STR_REPEATODBC 1.0
SQL_FN_STR_REPLACEODBC 1.0
SQL_FN_STR_RIGHTODBC 1.0
SQL_FN_STR_RTRIMODBC 1.0
SQL_FN_STR_SOUNDEXODBC 2.0
SQL_FN_STR_SPACEODBC 2.0
SQL_FN_STR_SUBSTRINGODBC 1.0
SQL_FN_STR_UCASEODBC 1.0

If an application can call the LOCATE scalar function with the string_exp1, string_exp2, and start arguments, the driver returns the SQL_FN_STR_LOCATE bitmask. If an application can call the LOCATE scalar function with only the string_exp1 and string_exp2 arguments, the driver returns the SQL_FN_STR_LOCATE_2 bitmask. Drivers that fully support the LOCATE scalar function return both bitmasks.

SQL_SUBQUERIES (ODBC 2.0)

A 32-bit bitmask enumerating the predicates that support subqueries:

SQL_SQ_CORRELATED_SUBQUERIES

SQL_SQ_COMPARISON

SQL_SQ_EXISTSSQL_SQ_IN

SQL_SQ_QUANTIFIED.

SQL_SQ_CORRELATED_SUBQUERIES

A bitmask indicating that all predicates that support subqueries also support correlated subqueries.

SQL_SYSTEM_FUNCTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scalar system functions supported by the driver and the associated data source. The following bitmasks are used to determine which system functions are supported:

SQL_FN_SYS_DBNAME

SQL_FN_SYS_IFNULL

SQL_FN_SYS_USERNAME.

SQL_TABLE_TERM (ODBC 1.0)

A character string with the data source vendor's name for a table; for example, "table" or "file".

SQL_TIMEDATE_ADD_INTERVALS (ODBC 2.0)

A 32-bit bitmask enumerating the timestamp intervals supported by the driver and the associated data source for the TIMESTAMPADD scalar function. The following bitmasks are used to determine which intervals are supported:

SQL_FN_TSI_FRAC_SECOND

SQL_FN_TSI_SECOND

SQL_FN_TSI_MINUTE

SQL_FN_TSI_HOUR

SQL_FN_TSI_DAY

SQL_FN_TSI_WEEK

SQL_FN_TSI_MONTH

SQL_FN_TSI_QUARTER

SQL_FN_TSI_YEAR.

 SQL_TIMEDATE_DIFF_INTERVALS (ODBC 2.0)

A 32-bit bitmask enumerating the timestamp intervals supported by the driver and the associated data source for the TIMESTAMPDIFF scalar function. The following bitmasks are used to determine which intervals are supported:

SQL_FN_TSI_FRAC_SECOND

SQL_FN_TSI_SECOND

SQL_FN_TSI_MINUTE

SQL_FN_TSI_HOUR

SQL_FN_TSI_DAY

SQL_FN_TSI_WEEK

SQL_FN_TSI_MONTH

SQL_FN_TSI_QUARTER

SQL_FN_TSI_YEAR.

SQL_TIMEDATE_FUNCTIONS (ODBC 1.0)

A 32-bit bitmask enumerating the scalar date and time functions supported by the driver and the associated data source. The information type was introduced in ODBC 1.0; each bitmask is labeled with the version in which it was introduced. The following bitmasks are used to determine which date and time functions are supported:

BitmaskVersion
SQL_FN_TD_CURDATEODBC 1.0
SQL_FN_TD_CURTIMEODBC 1.0
SQL_FN_TD_DAYNAMEODBC 2.0
SQL_FN_TD_DAYOFMONTHODBC 1.0
SQL_FN_TD_DAYOFWEEKODBC 1.0
SQL_FN_TD_DAYOFYEARODBC 1.0
SQL_FN_TD_HOURODBC 1.0
SQL_FN_TD_MINUTEODBC 1.0
SQL_FN_TD_MONTHODBC 1.0
SQL_FN_TD_MONTHNAMEODBC 2.0
SQL_FN_TD_NOWODBC 1.0
SQL_FN_TD_QUARTERODBC 1.0
SQL_FN_TD_SECONDODBC 1.0
SQL_FN_TD_TIMESTAMPADDODBC 2.0
SQL_FN_TD_TIMESTAMPDIFFODBC 2.0
SQL_FN_TD_WEEKODBC 1.0
SQL_FN_TD_YEARODBC 1.0

 SQL_TXN_CAPABLE (ODBC 1.0)

A 16-bit integer value describing the transaction support in the driver or data source. The information type was introduced in ODBC 1.0; each return value is labeled with the version in which it was introduced.

SQL_TC_NONE = Transactions not supported. (ODBC 1.0)

SQL_TC_DML = Transactions can only contain Data Manipulation Language (DML) statements (SELECT, INSERT, UPDATE, DELETE). Data Definition Language (DDL) statements encountered in a transaction cause an error. (ODBC 1.0)

SQL_TC_DDL_COMMIT = Transactions can only contain DML statements. DDL statements (CREATE TABLE, DROP INDEX, and so on) encountered in a transaction cause the transaction to be committed. (ODBC 2.0)

SQL_TC_DDL_IGNORE = Transactions only contain DML statements. DDL statements encountered in a transaction are ignored. (ODBC 2.0)

SQL_TC_ALL = Transactions can contain DDL statements and DML statements in any order. (ODBC 1.0)

 SQL_TXN_ISOLATION_OPTION(ODBC 1.0)

A 32-bit bitmask enumerating the transaction isolation levels available from the driver or data source. For descriptions of these isolation levels, see the description of SQL_DEFAULT_TXN_ISOLATION. The following bitmasks are used in conjunction with the flag to determine which options are supported:

SQL_TXN_READ_UNCOMMITTED

SQL_TXN_READ_COMMITTED

SQL_TXN_REPEATABLE_READ

SQL_TXN_SERIALIZABLE

SQL_TXN_VERSIONING.

 SQL_UNION (ODBC 2.0)

A 32-bit bitmask enumerating the support for the UNION clause:

SQL_U_UNION = The data source supports the UNION clause.

SQL_U_UNION_ALL = The data source supports the ALL keyword in the UNION clause.

(SQLGetInfo returns both SQL_U_UNION and SQL_U_UNION_ALL in this case.)

 SQL_USER_NAME (ODBC 1.0)

A character string with the name used in a particular database, which can be different than the login name.

Code Example

SQLGetInfo returns lists of supported options as a 32-bit bitmask in rgbInfoValue. The bitmask for each option is used in conjunction with the flag to determine whether the option is supported.

For example, an application could use the following code to determine whether the SUBSTRING scalar function is supported by the driver associated with the hdbc:

   UDWORD    fFuncs;
   SQLGetInfo(hdbc,           SQL_STRING_FUNCTIONS,          
   (PTR)&fFuncs,           sizeof(fFuncs),           NULL);
   if (fFuncs & SQL_FN_STR_SUBSTRING) /* SUBSTRING supported */...;else
   /* SUBSTRING not supported */   ...;

Related Functions

For information aboutSee
Returning the setting of a connection optionSQLGetConnectOption (extension)
Determining if a driver supports a functionSQLGetFunctions (extension)
Returning the setting of a statement optionSQLGetStmtOption (extension)
Returning information about a data source's data typesSQLGetTypeInfo (extension)


4D - Documentation   Français   English   German   4D ODBC, Command Theme List   4D ODBC, Command Alphabetical List   Back   Previous   Next