Call Level Interface Guide and Reference
For a given C data type:
- the first column of the table lists the legal input values of the
fSqlType argument in SQLBindParameter() or
SQLSetParam().
- the second column lists the outcomes of a test, often using the length of
the parameter data as specified in the pcbValue argument in
SQLBindParameter() or SQLSetParam(), which the driver
performs to determine if it can convert the data.
- the third column lists the SQLSTATE returned for each outcome by
SQLExecDirect() or SQLExecute().
Note: | Data is sent to the data source only if the SQLSTATE is 00000 (Success).
|
The tables list the conversions defined by ODBC to be valid for a given SQL
data type.
If the fSqlType argument in SQLBindParameter() or
SQLSetParam() contains a value not shown in the table for a given C
data type, SQLSTATE 07006 is returned (Restricted data type attribute
violation).
If the fSqlType argument contains a value shown in the table but
which specifies a conversion not supported by the driver,
SQLBindParameter() or SQLSetParam() returns SQLSTATE HYC00 (Driver not capable).
If the rgbValue and pcbValue arguments specified in
SQLBindParameter() or SQLSetParam() are both null
pointers, that function returns SQLSTATE HY009 (Invalid argument value).
- Length of data
- the total length of the data after it has been converted to the specified
SQL data type (excluding the null termination byte if the data was converted
to a string). This is true even if data is truncated before it is sent to the
data source.
- Column length
- the maximum number of bytes returned to the application when data is
transferred to its default C data type. For character data, the length does
not include the null termination byte.
- Display size
- the maximum number of bytes needed to display data in character form.
- Significant digits
- the minus sign (if needed) and the digits to the left of the decimal
point.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]