Contents|Index|Previous|Next

Using Data Type Identifiers

Applications use data type identifiers in two ways: to describe their buffers to the driver, and to retrieve metadata about the result set from the driver so they can determine what type of C buffers to use to store the data. Applications call the following functions to perform these tasks:

odbc00090000.gif SQLBindParameter, SQLBindCol, and SQLGetData to describe the C data type of application buffers.

odbc00090000.gif SQLBindParameter to describe the SQL data type of dynamic parameters.

odbc00090000.gif SQLColAttribute and SQLDescribeCol to retrieve the SQL data types of result set columns.

odbc00090000.gif SQLDescribeParameter to retrieve the SQL data types of parameters.

odbc00090000.gif SQLColumns, SQLProcedureColumns, and SQLSpecialColumns to retrieve the SQL data types of various schema information

odbc00090000.gif SQLGetTypeInfo to retrieve a list of supported data types.

Data type identifiers are stored in the SQL_DESC_CONCISE_TYPE field of a descriptor. The descriptor functions SQLSetDescField and SQLSetDescRec can be used with the appropriate types to perform the tasks listed in the previous list. For more information, see SQLSetDescField.