Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Microsoft SQL Server
Environment versions
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only