Cancel any rows pending from the most recently executed query.
RETCODE dbcanquery(dbproc) DBPROCESS *dbproc;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
SUCCEED or FAIL.
The most common reasons for failure are a dead DBPROCESS or a network error.
This routine is an efficient way to throw away any unread rows that result from the most recently executed SQL query. Calling dbcanquery is equivalent to calling dbnextrow until it returns NO_MORE_ROWS, but dbcanquery is faster because it allocates no memory and executes no bindings to user data.
If you have set your own interrupt handler using dbsetinterrupt, you cannot call dbcanquery in your interrupt handler. This would cause output from the server to DB-Library to become out of sync. If you want to ignore any unread rows from the current query, the interrupt handler should set a flag that you can check before the next call to dbnextrow.
dbresults must return SUCCEED before an application can call dbcanquery.
If you want to ignore all of the results from all of the commands in the current command batch, call dbcancel instead.