16.8.5 SQLPutData
- Organization of this subsection
(1) Function
This ODBC function sends parameter data to the HADB ODBC driver when the SQL statement is executed.
(2) Format
SQLRETURN SQLPutData ( SQLHSTMT StatementHandle, /* In */ SQLPOINTER DataPtr, /* In */ SQLLEN StrLen_or_Ind /* In */ )
(3) Arguments
- StatementHandle
-
Specifies a statement handle.
- DataPtr
-
Specifies a pointer to the buffer containing the actual data for the parameters. The data must be in the C data type specified in ValueType of SQLBindParameter.
- StrLen_or_Ind
-
-
When SQL_C_CHAR or SQL_C_BINARY is specified for the C data type in SQLBindParameter
Specify the length of *DataPtr, SQL_NTS, or SQL_NULL_DATA.
-
When any other C data type is specified in SQLBindParameter
Specify SQL_NULL_DATA. If any other value is specified, this argument is ignored and the HADB ODBC driver assumes that the size of the *DataPtr buffer is the C data type specified in ValueType of SQLBindParameter.
-
(4) Return value
This ODBC function returns SQL_SUCCESS, SQL_ERROR, or SQL_INVALID_HANDLE.
(5) SQLSTATE
This ODBC function returns one of the following SQLSTATE values:
SQLSTATE |
Description |
Remarks |
Returned |
---|---|---|---|
01000 |
General warning |
-- |
N |
01004 |
Character string data was right-truncated |
N |
|
07006 |
Restricted data type attribute violation |
N |
|
07S01 |
Invalid use of default parameter |
N |
|
08S01 |
Communication link failure |
N |
|
22001 |
Character string data was right-truncated |
N |
|
22003 |
Numeric value out of range |
N |
|
22007 |
Invalid datetime format |
N |
|
22008 |
Datetime field overflow |
N |
|
22012 |
Division by zero |
N |
|
22015 |
Interval field overflow |
N |
|
22018 |
Invalid character value for cast specification |
N |
|
HY000 |
General error |
N |
|
HY001 |
Memory allocation error |
N |
|
HY008 |
Operation cancelled |
N |
|
HY009 |
Invalid use of null pointer |
A null pointer is specified for DataPtr, but the value specified in StrLen_or_Ind is neither 0 nor SQL_NULL_DATA. |
Y |
HY010 |
Function sequence error |
A data parameter required for execution has not been obtained by SQLParamData. |
Y |
HY013 |
Memory management error |
-- |
N |
HY019 |
Non-character or non-binary data was segmented and sent separately |
N |
|
HY020 |
Attempt to concatenate a null value |
N |
|
HY090 |
Invalid string or buffer length |
The following conditions are all satisfied:
|
Y |
HY117 |
Connection suspended |
-- |
N |
HYT01 |
Connection timeout expired |
N |
|
IM001 |
Driver does not support this function |
N |
|
IM017 |
Invalid asynchronous polling |
N |
|
IM018 |
Incomplete asynchronous execution |
N |
- Legend:
-
Y: This SQLSTATE might be returned by the HADB ODBC driver.
N: This SQLSTATE is not returned by the HADB ODBC driver.
--: None
(6) Notes
This ODBC function does not support the following functions:
-
Data correspondence for columns
-
Segmented transmission