- Conformance
- Version Introduced: ODBC 1.0 Standards Compliance: ISO 92
- Summary
- SQLExecute executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement.
Arguments
- StatementHandle
- ReturnsSQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE, or SQL_PARAM_DATA_AVAILABLE.
SQLExecute returns either SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value can be obtained by calling HandleType of SQL_HANDLE_STMT and a StatementHandle. The following table lists the SQLSTATE values commonly returned by SQLExecute and explains each one in the context of this function; the notation "(DM)" precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.