Data types and data conversion in DB2 UDB CLI functions
The table shows all of the supported SQL types and their corresponding symbolic names. The symbolic names are used in SQLBindParam(), SQLBindParameter(), SQLSetParam(), SQLBindCol(), and SQLGetData() to indicate the data types of the arguments. Each column is described as follows:
- SQL type
- This column contains the SQL data type as it appears in an SQL statement. The SQL data types are dependent on the Database Management System (DBMS).
- SQL symbolic
- This column contains an SQL symbolic name that is defined (in sqlcli.h) as an integer value. This value is used by various functions to identify an SQL data type in the first column.
Table 1. SQL data types and SQL symbolic names SQL type SQL symbolic BIGINT SQL_BIGINT BINARY SQL_BINARY BLOB SQL_BLOB CHAR SQL_CHAR, SQL_WCHAR1 CLOB SQL_CLOB DATE SQL_DATE DBCLOB SQL_DBCLOB DECIMAL SQL_DECIMAL DOUBLE SQL_DOUBLE FLOAT SQL_FLOAT GRAPHIC SQL_GRAPHIC INTEGER SQL_INTEGER NUMERIC SQL_NUMERIC REAL SQL_REAL SMALLINT SQL_SMALLINT TIME SQL_TIME TIMESTAMP SQL_TIMESTAMP VARBINARY SQL_VARBINARY VARCHAR SQL_VARCHAR, SQL_WVARCHAR1 VARGRAPHIC SQL_VARGRAPHIC
- 1
- SQL_WCHAR and SQL_WVARCHAR can be used to indicate Unicode data.
- Other C data types in DB2 UDB CLI functions
As well as the data types that map to SQL data types, there are also C symbolic types used for other function arguments, such as pointers and handles.
- Data conversion in DB2 UDB CLI functions
DB2 UDB call level interface (CLI) manages the transfer and any required conversion of data between the application and the Database Management System (DBMS).
Parent topic:
Writing a DB2 UDB CLI application