MDAC 2.5 SDK - ODBC Programmer's Reference
Chapter 9: Executing Statements


 

Executing Procedures

ODBC defines a standard escape sequence for executing procedures. For the syntax of this sequence and a code example that uses it, see "Procedure Calls" in Chapter 8, "SQL Statements."

To execute a procedure, an application performs the following actions:

  1. Sets the values of any parameters. For more information, see "Statement Parameters," later in this chapter.

  2. Calls SQLExecDirect and passes it a string containing the SQL statement that executes the procedure. This statement can use the escape sequence defined by ODBC or DBMS-specific syntax; statements that use DBMS-specific syntax are not interoperable.

  3. When SQLExecDirect is called, the driver: