▪ SQL data types, which indicate the data type of data stored at the data source (for example, the solidDB server).
▪ C data types, which indicate the data type of data stored in application buffers.
Each SQL data type corresponds to an ODBC C data type. Before returning data from the data source, the driver converts it to the specified C data type. Before sending data to the data source, the driver converts it from the specified C data type.
For information about driver-specific SQL data types, see the driver documentation.
SQL data types
In accordance with the SQL-92 standard, each DBMS defines its own set of SQL data types. For each SQL data type in the SQL-92 standard, a #define value, known as a type identifier, is passed as an argument in ODBC functions or returned in the metadata of a result set.
Drivers map data source-specific SQL data types to ODBC SQL data type identifiers and driver-specific SQL data type identifiers. The SQL_DESC_CONCISE_TYPE field of an implementation descriptor is where the SQL data type is stored.
The solidDB ODBC driver does not support the following SQL_92 data types:
ODBC defines the C data types and their corresponding ODBC type identifiers.
Applications call one of the following functions:
▪ SQLBindCol or SQLGetData to pass an applicable C type identifier in the TargetType argument. In this way, applications specify the C data type of the buffer that receives result set data.
▪ SQLBindParameter to pass the appropriate C type identifier in the ValueType argument. In this way, applications specify the C data type of the buffer containing a statement parameter.
The SQL_DESC_CONCISE_TYPE field of an application descriptor is where the C data type is stored.