Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a VFP routine to update many tables/record
Message
De
05/09/2006 20:03:03
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01151034
Message ID:
01151168
Vues:
45
>One thing that bothers me is what happens if another user changes the value in the database table while I am potsing around with the cursor/view? Then the program tries to update the table but the values are different there? How would you "trap" these type of conditions?

Well... If you've got a lot of that, you probably have a data model problem.

However, if there is a conflict, you handle it by checking the error array.

You do realize that the user was able to update the various tables and the begin transaction/end transaction happens after the user hits save?

If there's a conflict, only the current user (the last one to try to save) has a problem. If you used pessimistic style, the last one trying to update the record would be prevented and then they might make the change they wanted when the locks were released. The last person always gets to make their change. This way you get the chance to show them what changed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform