>How do you gracefully handle the situation when a user presses ESC while a SPT query is executing? On Escape, On Key Label Esc and even Set Escape Off are ignored as are Set Talk Off and just about everthing else I can think of. I don't mind if the query stops but the "Called from..." messages from echoing to the form are unsightly.
I think that you might find the solution you need on pp 114-115 of the Client/Server Applications with VFP and SQL Server book from Henzenwerke.
It involves using an asynchronous connection, wrapping the SQLExec() in a Do While loop and trapping for the Escape key to issue the SQLCancel() command to terminate the query on the server.
Kendall Webb
Senior Software Engineer
MCAD.Net/MCSD.Net