C data types that do not map to SQL data types
In addition to the data types that map to SQL data types, other C symbolic types are used for other function arguments, such as pointers and handles.
The following table shows both generic and ODBC data types used for these arguments.
Defined C type | Base C type | Typical usage |
---|---|---|
SQLPOINTER | void * | Pointers to storage for data and parameters. |
SQLHENV | long int (31-bit) or int (64-bit)1 | Handle referencing environment information. |
SQLHDBC | long int (31-bit) or int (64-bit)1 | Handle referencing data source connection information. |
SQLHSTMT | long int (31-bit) or int (64-bit)1 | Handle referencing statement information. |
SQLUSMALLINT | unsigned short int | Function input argument for unsigned short integer values. |
SQLUINTEGER | unsigned long int (31-bit) or unsigned int (64-bit)1 | Function input argument for unsigned long integer values. |
SQLLEN | int | Function input or output argument for 32-bit integer values. |
SQLULEN | unsigned int | Function input or output argument for unsigned 32-bit integer values. |
SQLRETURN | short int | Return code from Db2 ODBC functions. |
SQLWCHAR | wchar_t (31-bit) or unsigned short (64-bit)1 | Data type for a Unicode UCS-2 character. |
SQLWCHAR * | wchar_t * (31-bit) or unsigned short * (64-bit)1 | Pointer to storage for Unicode UCS-2 data. |
Note:
|