RECALL

SQLCancel()

This function quits execution of a command you've passed to the server. It's relevant only when you're in asynchronous mode.

Usage

nSuccess = SQLCancel( nConnectionHandle )
As far as we can tell, SQLCancel() always returns 1 as long as you give it a valid connection handle. It doesn't matter if there's actually something to cancel, or even if you're in asynchronous mode.

Use this function when you've started a process and realize that it's not such a good idea. We can think of a couple of handy ways to use this. For example, you might set up a timer and cancel after the specified time has elapsed. Or you might put up a message to the user indicating what's happening and including a Cancel button. If the user presses Cancel, you use SQLCancel() to kill the process.

Example

nHandle = SQLConnect("Northwinds") = SQLSetProp(nHandle, "Asynchronous", .T.) = SQLExec(nHandle, "Select * FROM Customers,Orders") * Oh, my goodness, it has no join condition! = SQLCancel(nHandle)

See Also

SQLConnect(), SQLExec(), SQLPrepare(), SQLSetProp()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net