skip to main content
IP API Reference for Java : Statement-level Methods for Java : sqlipExecuteStmt
 

sqlipExecuteStmt

This method is called to execute both SELECT and non-SELECT prepared statements.
For statements that result in a cursor, the IP executes the statement and opens the cursor to the first row. Return the number of rows selected in the piNumResRows parameter. If the number of rows selected cannot be determined at this time, then return -1. Call sqlipCloseCursor when all rows have been fetched or when the application closes the statement.
For statements that update the data (such as INSERT, UPDATE, and DELETE), the IP executes the statement, returns in piNumResRows the number of rows affected, and returns 0 for the number of columns in the cursor when sqlipGetNumcols is called.
A sqlipCloseCursor method is called only when columns are returned.
int sqlipExecuteStmt(xo_long piNumResRows);
 
Table 85: Parameters for sqlipExecuteStmt 
Parameter
Type
Description
OUTPUT
 
 
piNumResRows
xo_long
Number of rows in the cursor or the number of rows affected for data modifying query. If the statement results in a cursor and the number of rows in the cursor cannot be determined then return –1.
RETURN
 
 
 
int
OADS_SUCCESS – cursor was opened
OADS_ERROR – error processing the request

See also 

sqlipCloseCursor
sqlipGetNumcols