Preparing and Executing Statements

    To prepare a statement once, then execute it multiple times
  1. Call SQLPrepare to prepare the statement.
  2. Optionally, call SQLNumParams to determine the number of parameters in the prepared statement.
  3. Optionally, for each parameter in the prepared statement
  4. Optionally, get result set information. For more information, see Getting Result Set Information.
  5. If the statement has parameter markers, for each parameter
  6. For each execution of a prepared statement
    1. If the statement has parameter markers, put the data values into the bound program buffer.
    2. Call SQLExecute to execute the prepared statement.
    3. If data-at-execution text or image parameters are used, handle them. For more information, see Using Data-at-Execution Parameters.
  7. Call SQLFreeStmt with an fOption of SQL_RESET_PARAMS to release all the bound parameter buffers.