Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

sqlipExecuteStmt

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

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);

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

TitleResults for “How to create a CRG?”Also Available inAlert