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