Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2005
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement