Using SQL Execution Procedures

The minimum ODBC SQL conformance level requires the driver to support:

  • Data Definition Language (DDL): Create Table and Drop Table.

  • Data Manipulation Language (DML): simple Select, Insert, Update Searched, and Delete Searched.

  • Expressions: simple (such as A > B + C).

  • Data types: Char, Varchar, or Long Varchar.

The PeopleSoft Open Query ODBC driver does not support the minimum SQL conformance level even though it reports supporting extended syntax. PeopleSoft Open Query supports only the ODBC extended SQL grammar for stored procedures. The stored procedure syntax is:

{[? = ] call procedure_name [ (param, ...)]}

The stored procedure execution model supports the independent creation of a SQL statement. Independent creation is done through PeopleSoft Query. However, instead of a stored procedure, the result is a PeopleSoft Query object.

A statement handle references statement information, such as network information, SQLSTATE values and error messages, cursor names, number of result set columns, and status information for SQL statement processing. Before an application can execute a SQL statement, it must allocate a statement handle for the statement. To allocate a statement handle, an application declares a variable of type hstmt and passes its address to SQLAllocStmt.