Example: lrd_cancelStatement Handling Functions

Cancels the results of a query.

LRDRET lrd_cancel( LRD_CONNECTION *mptConnection, LRD_CURSOR *mptCursor, long mliOption, int miDBErrorSeverity );

mptConnection A pointer to an LRD_CONNECTION structure.
mptCursor A pointer to an LRD_CURSOR structure.
mliOption One of the Cancel Options.
miDBErrorSeverity The Error Severity Levels of a failure in a database routine.

The lrd_cancel function cancels the previous statement or information submitted to the database server. In Oracle, lrd_cancel informs the server to cancel the query and free any resources associated with the cursor. This is useful if you require only the first row(s) of a multi-row query. You call lrd_cancel after lrd_fetch to inform the server that you will not perform additional fetches.

You can use lrd_cancel to reset a single cursor or all the cursors in a connection. Note that one of the first two parameters must be NULL. If you are canceling the contents of a cursor, the mptConnection parameter must be NULL. If you are canceling the contents of all the cursors in a connection, the mptCursor parameter must be NULL.

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

Return Values

See LRD Return Values.


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