DateDefaultCMapping IBM data server driver configuration keyword

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

Equivalent CLI keyword
MapDateCDefault
Equivalent IBM® Data Server Provider for .NET connection string keyword
N/A
db2dsdriver.cfg configuration syntax
<parameter name="DateDefaultCMapping" value="0 | 1 | 2"/>
Default setting:
The default C type representation for DATE data is SQL_C_TYPE_DATE.
Usage notes:
DateDefaultCMapping controls the C type that is used when SQL_C_DEFAULT is specified for DATE 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 DateDefaultCMapping as follows:
  • 0 - for the default SQL_C_TYPE_DATE C type representation: a struct containing numeric members for year, month and day
  • 1 - for an SQL_C_CHAR C type representation: "2009-01-01"
  • 2 - for an SQL_C_WCHAR C type representation: "2009-01-01" in UTF-16.
This keyword affects the behavior of CLI functions where SQL_C_DEFAULT can be specified as a C type, such as SQLBindParameter(), SQLBindCol(), and SQLGetData().