Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RLock the Header
Message
From
25/01/2006 11:09:03
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01090086
Message ID:
01090103
Views:
14
>RLOCK( alias(), '0' ) will lock the header record. I intent to use this, in a certain legacy app, to have enough time to retrieve a next ID from the same table, that can be used in a new record. The rlock of the header should prevent that a concurrent user tries the same thing at the same time, and retrieves the same ID.
>
>Currently, the table is filelocked, but that action regularly frustrates users, when someone else has a record lock on one of the existing records at the same time.
>
>Has anyone here experience with this type of use of RLOCK()? Will the method be bulletproof?

Filelock is imo better than recordlock in case there is no entry yet

It is not normal that the users complain, a nextid seek and rewrite takes no time at all

You do have a separate table for the nextid's, don't you ?
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform