Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLCANCEL
Message
 
 
À
15/07/1998 14:30:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00117736
Message ID:
00117779
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform