Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLCANCEL
Message
 
 
To
15/07/1998 14:30:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00117736
Message ID:
00117779
Views:
16
>I am having a problem with the SQLCANCEL function. I can't seem to get it to cancel the SQLEXEC function. Here's my code.
>
>WAIT "Executing Query, Please Wait..." WINDOW NOWAIT NOCLEAR
>SET ESCAPE OFF
>ON KEY LABEL ESC DO CANCELSQL
>mReturn = SQLEXEC(mHandle, msql, mcursor)
>ON KEY LABEL ESC
>SET ESCAPE ON
>WAIT CLEAR
>
>PROC CANCELSQL
> IF SQLCANCEL(mHandle) = 1
> WAIT CLEAR
> CLEAR TYPEAHEAD
> WAIT WINDOW "Report canceled."
> ENDIF
>RETURN
>
>What am I doing wrong?

I don't know that you are doing anything wrong. When you issue the SqlExec, control by VFP is lost until you get a return response back from the server. At least this is what my experience with Oracle. So, by the time your cancel code can execute, you already have a return value from the SqlExec, and the cancel becomes a moot point.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform