lrd_ora8_exec

Example: lrd_ora8_execOracle 8.0 Functions

Executes an SQL statement in Oracle 8.x.

LRDRET lrd_ora8_exec( void *mpvLRDDBIHandleSvcCtx, char *mpvLRDDBIHandleStmt, unsigned long muliTotalRows, unsigned long muliSkipRows, unsigned long *mpuliRowsProcessed, LRD_ORA8_PRINT_ROW_TYPEDEF mpfjPrintRow, void *Reserved1, void *Reserved2, long mliMode, int miDBErrorSeverity );

mpvLRDDBIHandleSvcCtx A pointer to an LRDDBI Service Context Handle.
mpvLRDDBIHandleStmt A non-NULL pointer to an LRDDBI Stmt Handle.
muliTotalRows The total number of rows in the placeholder arrays or the number of times to execute the statement for non-query statements.
muliSkipRows For queries, 0. For non-query statements, the number of rows to be skipped in the placeholder arrays.
mpuliRowsProcessed The number of rows to be processed.
mpfjPrintRow A pointer to a printing function. Pass 0.
Reserved1 Pass 0.
Reserved2 Pass 0.
mliMode The database mode. The default mode is 0.
miDBErrorSeverity The Error Severity Levels of a failure in a database routine.

The lrd_ora8_exec function executes an SQL statement set by lrd_ora8_stmt. This function resets the contents of the SQL statement set by lrd_ora8_stmt; you must provide a new SQL statement (and optionally bind the parameters) after every lrd_ora8_exec function call.

Note: To repeat a query, you must reissue an lrd_ora8_stmt function.

If you are using placeholders, the host variables must be bound to placeholders using lrd_ora8_bind_placeholder, before calling lrd_ora8_exec.

You can determine whether or not the update succeeded by evaluating the fifth parameter, mpuliRowsProcessed. Pass a pointer to this parameter and check its value for each lrd_ora8_exec statement.

The database mode, mliMode, can be one of:

  • 0 - Default
  • 16 - Describe only. Obtain a description of the columns used in the statement, but don't execute the statement.
  • 32 - Commit on success. Commit the changes to the database if the statement execution succeeded.

For more details refer to the Function Header File lrd.h in the include directory.

Return Values

See LRD Return Values.

Parameterization

You cannot use standard parameterization for any arguments in this function.