solidDB Help : solidDB reference : ODBC: Data types
  
ODBC: Data types
This section describes the ODBC data types.
ODBC defines the following sets of data types:
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:
BIT
BIT_VARYING
TIME_WITH_TIMEZONE
TIMESTAMP_WITH_TIMEZONE
NATIONAL_CHARACTER
For more information, see SQL data types.
C 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.
Driver-specific C data types do not exist.
For more information, see C data types.
See
Data type identifiers
Numeric literals
Overriding default precision and scale for numeric data types
Data type identifiers and descriptors
Decimal digits
Transfer octet length
Constraints of the Gregorian calendar
Converting data from SQL to C data types
Converting data from C to SQL data types