Version: 7.0.0

SQLPrepare ​

Function ​

Prepares an SQL statement for subsequent execution.

Prototype ​

c
SQLRETURN SQLPrepare(SQLHSTMT      StatementHandle,    
                     SQLCHAR       *StatementText,     
                     SQLINTEGER    TextLength);

Parameters ​

Table 1 SQLPrepare parameters

Keyword

Parameter Description

StatementHandle

Statement handle.

StatementText

SQL text string.

TextLength

Length of StatementText.

Return Values ​

  • SQL_SUCCESS: The call is successful.

  • SQL_SUCCESS_WITH_INFO: Some warning information is present.

  • SQL_ERROR: The SQL statement precompilation failed.

  • SQL_INVALID_HANDLE: The input handle is invalid.

Example ​

See: Example