CODBCStmt.SetStmtParamStatusPtrmethod
Sets an SQLUSMALLINT value that points to an array of SQLUSMALLINT values containing status information for each row of parameter values after a call to Execute or ExecDirect. This field is required only if PARAMSET_SIZE is greater than 1.
Syntax
FUNCTION SetStmtParamStatusPtr (BYVAL dwAttr AS SQLUINTEGER) AS SQLRETURN
SetStmtQueryTimeout — one description covers them all.Parameters
| Name | Description | |
|---|---|---|
dwAttr | Value of the attribute. | |
dwAttr | Value of the attribute. |
Return value
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
Description
Sets an SQLUSMALLINT value that points to an array of SQLUSMALLINT values containing status information for each row of parameter values after a call to Execute or ExecDirect. This field is required only if PARAMSET_SIZE is greater than 1.
Remarks
The status values can contain the following values:
SQL_PARAM_SUCCESS: The SQL statement was successfully executed for this set of parameters.
SQL_PARAM_SUCCESS_WITH_INFO: The SQL statement was successfully executed for this set of parameters; however, warning information is available in the diagnostics data structure.
SQL_PARAM_ERROR: There was an error in processing this set of parameters. Additional error information is available in the diagnostics data structure.
SQL_PARAM_UNUSED: This parameter set was unused, possibly due to the fact that some previous parameter set caused an error that aborted further processing, or because SQL_PARAM_IGNORE was set for that set of parameters in the array specified by the SQL_ATTR_PARAM_OPERATION_PTR.
SQL_PARAM_DIAG_UNAVAILABLE: The driver treats arrays of parameters as a monolithic unit and so does not generate this level of error information.
This statement attribute can be set to a null pointer, in which case the driver does not return parameter status values. This attribute can be set at any time, but the new value is not used until the next time Execute or ExecDirect is called. Note that setting this attribute can affect the output parameter behavior implemented by the driver.
Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the IPD header.
If the specified timeout exceeds the maximum timeout in the data source or is smaller than the minimum timeout, SetStmtAttr substitutes that value and returns SQLSTATE 01S02 (Option value changed).
Note that the application need not call CloseCursor to reuse the statement if a SELECT statement timed out.
The query timeout set in this statement attribute is valid in both synchronous and asynchronous modes.
Reference
- Include file
CODBCStmt.inc - Defined in AfxNova/COdbcStmt.inc:1822
- Documented in Databases/ODBC Classes/CODBCStmt Class.md
- Topic: CODBCStmt Class