General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only