Information Procedures
ODBC defines these functions as a means for the application to get information about the ODBC driver and data source. Typically, the application calls these functions passing a value of the particular type of information of interest. These values are numerous and are defined in the Microsoft ODBC SDK reference manual.
Syntax
RETCODE SQLGetInfo(hdbc,fInfoType,rgbInfoValue,cbInfoValueMax,pcbInfoValue)
Description
SQLGetInfo returns general information about the driver and data source that is associated with a connection handle.
Parameters
This table describes the parameters:
Argument |
Type |
Use |
Description |
---|---|---|---|
hdbc |
HDBC |
Input |
Connection handle. |
fInfoType |
UWORD |
Input |
Type of information. FInfoType must be a value representing the type of interest. |
rgbInfoValue |
PTR |
Output |
Pointer to storage for the information. Depends on the fInfoType requested. |
cbInfoValueMax |
SWORD |
Input |
Maximum length of the rgbInfoValue buffer. |
pcbInfoValue |
SWORD FAR * |
Output |
The total number of bytes (excluding the null termination byte for character data) available to return in rgbInfoValue. |
Syntax
RETCODE SQLGetFunctions(hdbc,fFunction,pfExists))
Description
SQLGetFunctions returns information about whether a driver supports a specific ODBC function.
Parameters
This table describes the parameters:
Argument |
Type |
Use |
Description |
---|---|---|---|
hdbc |
HDBC |
Input |
Connection handle. |
fFunction |
UWORD |
Input |
SQL_API_ALL_FUNCTIONS or a #define value that identifies the ODBC function of interest. |
pfExists |
UWORD FAR * |
Output |
If fFunction is SQL_API_ALL_FUNCTIONS, pfExists points to a UWORD array with 100 elements. The array is indexed by #define values that are used by fFunction to identify each ODBC function; some elements of the array are unused and reserved for future use. An element has a value of True if it identifies an ODBC function that is supported by the driver. It has a value of False if it identifies an ODBC function that is not supported by the driver or does not identify an ODBC function. |
Syntax
RETCODE SQLGetTypeInfo(hstmt,fSqlType)
Description
SQLGetTypeInfo returns information about data types that are supported by the data source. The driver returns the information in the form of a SQL result set.
Parameters
This table describes the parameters:
Argument |
Type |
Use |
Description |
---|---|---|---|
hstmt |
HSTMT |
Input |
Statement handle for the result set. |
fSqlType |
SWORD |
Input |
The SQL data type. |