Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-user update conflict
Message
From
30/06/1999 08:28:35
 
 
To
30/06/1999 04:46:14
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00235735
Message ID:
00235785
Views:
20
>Hi all, I've got a strange problem here.
>
>When 2 users running the same form do data entry together over a network, somehow they will overwrite a record of each other. The field of the primary key is not changed, but all other fields are over written.
>
>All tables are already set to table buffering.
>Running on NT Server 4.0 SP5.
>No problem if only 1 user data entry.
>
>Thanks

Do you mean when they Edit the record? Look at TableUpdate(). If the second parameter is .T., it will overwrite the record without warning. Change this parameter to .F., TableUpdate() will then return .F., indicating that it can't update the record because someone else changed it since it was buffered. You can then use CURVAL() and OLDVAL(), the current value (just the value of the field, and GETFLDSTATE() to determine what has changed.

If your problem comes when two people append a new record, you have a bug in your primary key generation.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform