TimeDefaultCMapping IBM data server driver configuration keyword

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

Equivalent CLI keyword
Equivalent IBM® data server provider for .NET connection string keyword
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="TimeDefaultCMapping" value="0 | 1 | 2"/>
Default setting:
The default C type representation for TIME data is SQL_C_TYPE_TIME.
Usage notes:
The TimeDefaultCMapping keyword controls the C type that is used when SQL_C_DEFAULT is specified for TIME data. The TimeDefaultCMapping keyword is typically used with Microsoft applications, such as Microsoft Access, which assume SQL_C_CHAR as the default C type for datetime values. Set the TimeDefaultCMapping keyword as follows:
  • 0 - for the default SQL_C_TYPE_TIME C type representation: a struct that contains numeric members for hour, minute, and second.
  • 1 - for an SQL_C_CHAR C type representation: "12:34:56"
  • 2 - for an SQL_C_WCHAR C type representation: "12:34:56" in UTF-16.
The TimeDefaultCMapping keyword affects the behavior of CLI functions where SQL_C_DEFAULT can be specified as a C type, such as SQLBindParameter(), SQLBindCol(), and SQLGetData().
Attention: The TimeDefaultCMapping value supersedes CLIPatch2=24. If both the TimeDefaultCMapping value and CLIPatch2=24 are set, the TimeDefaultCMapping value takes precedence.