Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Quit VFP in On Error routine
Message
De
13/04/1998 09:22:16
 
 
À
13/04/1998 08:21:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00091468
Message ID:
00091492
Vues:
26
>>Here's the situation:-
>>
>>The application is a multi-user Accounting System. Depending on the kind of transaction being saved, there are many tables to be updated.
>>I use BEGIN TRANSACTION and END TRANSACTION to buffer, and an ON ERROR routine to perform a ROLLBACK if something goes wrong.
>>
>>After the ROLLBACK I perform a CLOSE on all tables and database and then want to QUIT/EXIT the application. However, VFP comes up with the message "Can not quit VFP", after which it attempts to continue back with the main code with ugly consequences. The only way out is CTRL-ALT-DEL.
>>
>>The code section is:-
>> ROLLBACK
>> CANCEL && I have tried with and without Cancel
>> CLOSE DATABASES
>> CLOSE TABLES
>> QUIT
>>
>>Any ideas on what I am doing wrong here?
>>
>>By the way, the ROLLBACK works great - the data never gets corrupted or partially saved. If only I could find the 'clean' way to exit the application.
>>
>>Greeting from Down Under.
>>
>>Alain Legrand
>
>
>Have you tried CLEAR ALL and CLOSE ALL instead of the other two CLOSE statements?


Addendum to the last post. CLEAR EVENTS should solve your problem. Ensure that you have normal shutdown code after your READ EVENTS statement in the main section of your app. The Cannot Quit message usually means there is code or an object executing or open.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform