Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper handling of deletion
Message
De
11/06/2010 04:21:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01468350
Message ID:
01468445
Vues:
40
>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.

On edit form uses buffers ?
on this case you can do a tablerevert() before delete the records
or better, a tableupdate() ( this support transactions )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform