首页 > 代码库 > C and SQL data types for ODBC and CLI

C and SQL data types for ODBC and CLI

C and SQL data types for ODBC and CLI

 

 

This topic lists the C and SQL data types for ODBC and CLI applications.

C data types for ODBC applications

You can pass the following C data types when you bind result set columns and parameters from ODBC applications.
SQL_C_DEFAULTSQL_C_CHARSQL_C_LONGSQL_C_SLONGSQL_C_ULONGSQL_C_SHORTSQL_C_SSHORTSQL_C_USHORTSQL_C_FLOATSQL_C_DOUBLESQL_C_BINARYSQL_C_NUMERIC

C data types for CLI applications

You can pass the following data type values when you bind result set columns and parameters from CLI applications.
SQL_DEFAULTSQL_CHARSQL_INTEGERSQL_SMALLINTSQL_FLOATSQL_REALSQL_DOUBLE

SQL data types for ODBC and CLI applications

You can pass the following SQL data type values when you bind result set columns and parameters from ODBC and CLI applications.
SQL_CHARSQL_VARCHARSQL_LONGVARCHARSQL_INTEGERSQL_SMALLINTSQL_FLOATSQL_REALSQL_DOUBLESQL_DECIMALSQL_TYPE_DATESQL_TYPE_TIMESQL_TYPE_TIMESTAMPSQL_TYPE_DATESQL_BINARYSQL_VARBINARYSQL_LONGVARBINARY

In the Win32 environment, the ODBC 3.x driver manager is required to use the ODBC 3.51 driver. This version of the driver manager automatically supports both 3.x applications and older, pre-3.x applications. Calls to deprecated APIs by older applications are automatically re-mapped to the 3.x APIs.

C and SQL data types for ODBC and CLI