Convert data from C to SQL

When you call SQLExecute or SQLExecDirect, HCL OneDB™ ODBC Driver retrieves the data for parameters that are bound with SQLBindParameter from storage locations in the application.

For data-at-execution parameters, call SQLPutData to send the parameter data. If necessary, HCL OneDB ODBC Driver converts the data from the data type that the ValueType argument specifies in SQLBindParameter to the data type that the fSqlType argument specifies in the SQLBindParameter. Finally, HCL OneDB ODBC Driver sends the data to the data source.

If the rgbValue and pcbValue arguments specified in SQLBindParameter are both null pointers, then that function returns SQLSTATE S1009 (Invalid argument value). To specify a null SQL data value, set the value that the pcbValue argument of SQLBindParameter points to or the value of the cbValue argument to SQL_NULL_DATA. To specify that the value in rgbValue is a null-terminated string, set these values to SQL_NTS.

The following terms are used in the tables:
Length of data
The number of bytes of SQL data that are available to send to the data source, regardless of whether the data is truncated before it goes to the data source. For string data, this does not include the null-termination byte.
Column length and display size
Defined for each SQL data type in Precision, scale, length, and display size.
Number of digits
The number of characters that represent a number, including the minus sign, decimal point, and exponent (if needed).
Words in italics
Represent elements of the HCL OneDB ODBC Driver SQL syntax.