SQLGetStmtOption() has been deprecated and replaced with SQLGetStmtAttr(). Although this version of DB2® UDB CLI continues to support SQLGetStmtOption(), it is recommended that you begin using SQLGetStmtAttr() in your DB2 UDB CLI programs so that they conform to the latest standards.
SQLGetStmtOption() returns the current settings of the specified statement option.
These options are set using the SQLSetStmtOption() function.
SQLRETURN SQLGetStmtOption( SQLHSTMT hstmt, SQLSMALLINT fOption, SQLPOINTER pvParam);
Data type | Argument | Use | Description |
---|---|---|---|
SQLHSTMT | hstmt | Input | Connection handle. |
SQLPOINTER | pvParam | Output | Value of the option. Depending on the value of fOption this can be a 32-bit integer value, or a pointer to a null terminated character string. |
SQLSMALLINT | fOption | Input | Option to retrieve. See Table 2 for more information. |
SQLGetStmtOption() provides the same function as SQLGetStmtAttr(), both functions are supported for compatibility reasons.
See Table 2 for a list of statement options.
SQLSTATE | Description | Explanation |
---|---|---|
HY001 | Memory allocation failure | The driver is unable to allocate memory required to support the processing or completion of the function. |
HY009 | Argument value that is not valid | The argument pvParam is a null pointer. A fOption that is not valid value is specified. |
HYC00 | Driver not capable | DB2 UDB CLI recognizes the option but does not support it. |