Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Quit VFP in On Error routine
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to Quit VFP in On Error routine
Miscellaneous
Thread ID:
00091468
Message ID:
00091468
Views:
80
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
Next
Reply
Map
View

Click here to load this message in the networking platform