Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking Strategy Needed
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00340545
Message ID:
00340673
Views:
36
>
if rlock('0','mytable') then
>   insert into mytable values (value1, value2)
>   unlock record 0 in mytable
>else
>   * you can't log in right now, try again
>endif
>
>You could put this in a loop with a counter or you could bump up reprocess so VFP internally runs its own loop and counter.

It is the 'You can't log in right now...' portion that is the problem. The user needs to log in 100% of the time. So I can put it in a loop, but what I want to make sure of is that they get logged in. How about:

DO WHILE NOT rlock('0','mytable')
insert into mytable values (value1, value2)
unlock record 0 in mytable
EXIT
ENDDO
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform