SQLPrepare prepares an SQL statement to be executed.
1 2 3 | SQLRETURN SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength); |
Keyword |
Description |
---|---|
StatementHandle |
Statement handle. |
StatementText |
SQL text string. |
TextLength |
Length of StatementText. |
If SQLPrepare returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, the application can then call SQLGetDiagRec, set HandleType and Handle to SQL_HANDLE_STMT and StatementHandle, and obtain the SQLSTATE value. The SQLSTATE value provides the detailed function calling information.
See Examples.