ODBC Data Type Conversion Table

The following table shows the default and supported mappings of ODBC SQL (and DB2 CLI) data types to C++ data types. You can change an attribute's C++ data type in its properties notebook. An 'S' indicates that the mapping is supported (you can map the specified ODBC SQL data type to the C++ data type). A 'D' indicates the default setting that Data Access Builder will use for mapping the ODBC SQL type. "not DB2" indicates that DB2 CLI does not support the mapping.

  C++ Attribute Type
ODBC/CLI
Type
short un-
signed
short
long un-
signed
long
double float int char un-
signed
char
char* IString IBool-
ean
IBinary-
Coded-
Decimal
IDate ITime ITime-
Stamp
BIT S S S S S S S S S S S D S      
TINYINT S S S S S S S D S S S   S      
UTINYINT S S S S S S S S D S S   S      
SMALLINT D S S S S S S S S S S   S      
USMALLINT S D S S S S S S S S S   S      
INTEGER S S D S S S S S S S S   S      
UINTEGER S S S D S S S S S S S   S      
BIGINT S S S S S S S S S S D   S      
UBIGINT S S S S S S S S S S D   S      
DOUBLE S S S S D S S S S S S   S      
FLOAT S S S S D S S S S S S   S      
REAL S S S S D S S S S S S   S      
DECIMAL S S S S S S S S S S S   D      
NUMERIC S S S S S S S S S S S   D      
CHAR S S S S S S S S
(not DB2)
S
(not DB2)
S
(not DB2)
D   S S S S
VARCHAR S S S S S S S S S S D   S S S S
LONG-
VARCHAR
S
(not DB2)
S
(not DB2)
S
(not DB2)
S
(not DB2)
S
(not DB2)
S
(not DB2)
S
(not DB2)
S S S D   S
(not DB2)
S S S
BINARY                   S D          
VARBINARY                   S D          
LONG-
VARBINARY
                  S D          
CLOB                   S D          
BLOB                   S D          
DATE                   S S     D   S
TIME                   S S       D S
TIMESTAMP                   S S     S S D


Change Attribute Properties