skip to main content
Interface Provider API : Reference : OAIP_procedure
 

OAIP_procedure

This function must be implemented by the IP, if the IP is to support stored procedure calls that return at most one result set. The OpenAccess SDK SQL engine passes stored procedure calls to this function for procedures that return, at most, one result set and the result set is pre-defined. Stored procedure calls are invoked using the ODBC stored procedure invocation syntax.
OAIP_getSupport should return true for IP_SUPPORT_PROCEDURE.
Refer to "Stored Procedure Processing" in the OpenAccess SDK SQL Engine Programmer's Guide for more information.
int OAIP_procedure(
    IP_HDBC hdbc,
    DAM_HSTMT hstmt,
    int iType,
    int64 * piNumResRows)
Table 23. Parameters for OAIP_procedure
Parameter
Type
Description
IN
hdbc
IP_HDBC
The connection handle as defined by the IP.
hstmt
DAM_HSTMT
The statement handle of the currently active statement.
iType
int
The type of operation requested:
DAM_FETCH - Get the next set of rows. Return DAM_SUCCESS_WITH_RESULT_PENDING when more rows are pending. Return DAM_SUCCESS when completed.
DAM_PROCEDURE - Execute the stored procedure and return the first set of rows or all the rows. If your IP is written to work in cursor mode, then return DAM_SUCCESS_WITH_RESULT_PENDING after returning a block of rows.
DAM_CLOSE - Cleanup processing of the stored procedure.
OUT
piNumResRows
int64 *
The number of rows affected by this operation
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure