Cancels the execution of the statements in the command buffer and flushes any pending results.
SqlCancel% ( sqlconn% )
where
SUCCEED (1) or FAIL (0).
When you call SqlCancel%, SQL Server stops executing the statements associated with sqlconn% or sqlconn& in the command buffer. Any pending results are read and discarded. You can call SqlCancel% after calling SqlExec%, SqlSend%, SqlOk%, SqlResults%, or SqlNextRow%. SqlCancel% cancels all statements in the command buffer. To cancel a single statement in a command buffer containing multiple statements, use SqlCanQuery%.
If you receive the DB-Library error 10038 "Results Pending," you can call SqlCancel to clear the pending results. If SqlCancel returns FAIL, the server may not be able to respond to the cancel request. Either continue to call SqlCancel until it returns SUCCEED, or close the DBPROCESS connection and open a new one.
SqlCanQuery%, SqlExec%, SqlNextRow%, SqlOk%, SqlResults%, SqlSend%