dbcanquery

Cancels any rows pending from the most recently executed query.

Syntax

RETCODE dbcanquery ( PDBPROCESS dbproc );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

Returns

SUCCEED or FAIL.

Remarks

This function is an efficient way to throw away any unread rows that result from the most recently executed SQL query. Calling dbcanquery is similar to calling dbnextrow until it returns no_more_rows. Binds are broken before rows are read.

The dbresults function 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.

See Also

dbcancel, dbnextrow, dbresults, dbsqlexec