Open topic with navigation
|Example: lrd_exec||Statement Handling Functions|
Executes an SQL statement.
LRDRET lrd_exec( LRD_CURSOR *mptCursor, unsigned long muliTotalRows, unsigned long muliSkipRows, unsigned long *mpuliRowsProcessed, long mliOption, int miDBErrorSeverity );
|mptCursor||A pointer to an LRD_CURSOR structure.|
|muliTotalRows||Oracle only–The total number of rows in the placeholder arrays. 0 for all other databases.|
|muliSkipRows||Oracle only–The number of rows to be skipped in the placeholder arrays. 0 for all other databases.|
|mpuliRowsProcessed||Oracle only–The number of rows that were processed. NULL for all other databases|
|mliOption||One of the Execution Options.|
|miDBErrorSeverity||The Error Severity Levels of a failure in a database routine.|
The lrd_exec function executes an SQL statement set by lrd_stmt.
This function resets the contents of the SQL statement set by lrd_stmt; you must provide a new SQL statement (and optionally bind the parameters) after every lrd_exec function call. To repeat a query, you must reissue an lrd_stmt function.
If you are using placeholders, the host variables must be bound to placeholders using lrd_bind_placeholder, before calling lrd_exec.
You can determine whether or not an update succeeded by evaluating the fourth parameter, mpuliRowsProcessed. Pass a pointer to this parameter and check its value for each lrd_exec statement.
For more details refer to the Function Header File lrd.h in the include directory.
See LRD Return Values.
You cannot use standard parameterization for any arguments in this function.