Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The right way to lookup/validate
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00963381
Message ID:
00964097
Views:
9
Hi John:

You are using the SP for validation; do you use a remote view to update the data? Or just a SQL passthrough statement? VFP Remote views handle conflicts quite well and I've (well, we in our company actually) been using them always when it comes to SQL Server apps in VFP.

I think what you encountered was an update conflict. During validation both users cannot see the customer id yet, so they pass. But when you do a tableupdate(), one user fails because the other has already committed the changes to the database first.

We usually code the front-end to handle update conflicts. It depends whether you want to force the update, or prompt the user that another user has updated the same customer record with his own changes to the database (and revert all the changes), or give the user the option to force the update.

However, since yours is a case of primary key duplication, you cannot force an update. You can only prompt the user that somebody else beat him, and the changes cannot be saved.

HTH...
Bernard L. Omiple
VFP, SQL Server, Crystal Reports
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform