MapTimestampCDefault CLI/ODBC and IBM data server driver configuration keyword

Specifies the default C type of TIMESTAMP columns and parameter markers.

db2cli.ini keyword syntax:
MapTimestampCDefault = 0 | 1 | 2
IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
<parameter name="MapTimestampCDefault" value="0 | 1 | 2"/>
Attention: The IBM data server driver configuration file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
Default setting:
The default C type representation for TIMESTAMP data is SQL_C_TYPE_TIMESTAMP.
Usage notes:
 
MapTimestampCDefault controls the C type that is used when SQL_C_DEFAULT is specified for TIMESTAMP columns and parameter markers. This keyword should be used primarily with Microsoft applications, such as Microsoft Access, which assume SQL_C_CHAR as the default C type for datetime values. Set MapTimestampCDefault as follows:
  • 0 - for the default SQL_C_TYPE_TIMESTAMP C type representation: a struct containing numeric members for year, month, day, hour, minute, second, and fraction of a second
  • 1 - for an SQL_C_CHAR C type representation: "2004-01-01 12:34:56.123...n", where n=12.
  • 2 - for an SQL_C_WCHAR C type representation: "2004-01-01 12:34:56.123456...n"" in UTF-16, where n=12.
This keyword affects the behavior of CLI functions where SQL_C_DEFAULT may be specified as a C type, such as SQLBindParameter(), SQLBindCol(), and SQLGetData().