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:
00340707
Views:
28
>>
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

Fine if you put a counter in there or a timer. What if something has gone horribly wrong? They get stuck in your loop forever.

Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform