>I have a free table (VFP6/SP3) with 4 records in it. At app startup, I want system1 to get a record lock on record1, system2 to get a record lock on record2, etc. I opened a dummy VFP session, opened the table shared, and rlock(1) at the command window to rlock for that session. Then I ran the code below on a secord VFP session, and it locks records 2
and 3. Can someone help me with my logic here? I want to limit the table to 4 records for 4 VFP sessions. Help?
>
>clear
>set reprocess to 2 automatic
> if !used('safety')
> use safety in 0 shared
> endif
> select safety
> locate for rlock() = .t.
> if !found()
> rlock(recno())
> else
> continue
> endif
>
>
>Thanks
After you do a LOCATE and didn't find anything, the record pointer is sitting at EOF(). You can't lock a record unless oyu are sitting on one.
Erik Moore
Clientelligence