Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper handling of deletion
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Proper handling of deletion
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01468350
Message ID:
01468350
Views:
107
Hi everybody,

We have a VFP application using SQL Server database as back-end. Although we're using SQLExec, in certain scenarios we're using technique to make SPT cursor updatable (so in essence create remote view).

Now, here are two scenarios I'm thinking what will be the best way to handle.

There is a search form with a grid. It displays multiple items to chose from. This form has New, Edit, Delete buttons.

The form is modeless. From this form I can open an Edit Item form which is also modeless.

Now I can switch back to the Grid and delete the record I'm editing. If I then try to close the application, I'll get the update conflict error in the Edit Item form and it's not properly released.

One of the possible solutions to this problem may be in disabling the Delete button if there are other opened forms.

However, we can have the same situation if one user has the Grid form opened, another user has Edit Item form opened and the first user deletes this item.

The error I found (I was testing the first scenario) on the CLOSE DATABASES ALL line in the main program. This line is invoked after ON ERROR (resetting on error back).

What would be the best way to handle such situation?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform