Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiuser with free table
Message
From
19/02/2003 22:47:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/02/2003 10:01:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00754912
Message ID:
00755325
Views:
10
>Hi,
>I am using free table (buffering - 5) in my multiuser application. It is a simple customer data entry app.
>Also, I am using vfp wizard to generate the data entry form.
>
>I face problem of "RECORD IS USED BY ANOTHER USER" when the baseclass try to RLOCK(). It occured when 2 users try to add 2 different records at the same time. Once the 1st user add the record successfully, the 2nd user will get the error.
>However, if I try to debug it, browse the table and re-try the RLOCK() again then it will sucessfully. Any ideas?
>
>Why the "new" record could be locked while other user add another?

This could be the situation where your particular configuration (buffering etc) confuses Fox and the table header isn't updated immediately after appending a new record, so the second user gets the same record number. Try to compare the record numbers for both users when this happens - if they are the same, I've heard the trick is to issue just
=reccount()
after the append command (or insert - depending onwhat you are using). This trick worked for such situations back in VFP5 (I've seen code which uses this - though I never had this problem, maybe exactly because this trick was used).

The theory behind this was that if there was a bug in VFP in situations like this, reccount() function was fixing it by forcing an update of the header.

Don't know if this still applies in current versions of Fox, but that's easy to check.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform