Default C Data Types

If an application specifies SQL_C_DEFAULT in SQLBindCol, SQLGetData, or SQLBindParameter, the driver assumes that the C data type of the output or input buffer corresponds to the SQL data type of the column or parameter to which the buffer is bound.

Important   Interoperable applications should not use SQL_C_DEFAULT. Instead, they should always specify the C type of the buffer they are using. The reason for this is that drivers cannot always correctly determine the default C type for the following reasons:

Because SQL_C_DEFAULT is provided only as a programming convenience, the application does not lose any functionality when it specifies the actual C data type.

A table showing the default C data type for each SQL data type is included in “Converting Data from SQL to C Data Types” later in this appendix.