Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a VFP routine to update many tables/record
Message
From
05/09/2006 20:03:03
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01151034
Message ID:
01151168
Views:
42
>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
Map
View

Click here to load this message in the networking platform