Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET REPROCESS TO
Message
From
28/12/1998 10:28:12
 
 
To
28/12/1998 07:19:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00169741
Message ID:
00170767
Views:
66
>>According to the help file, SET REPROCESS to AUTOMATIC, is the same as SET REPROCESS to –2, is the same as SET REPROCESS to 0 … Try forever and let the user terminate with the escape key. SET REPROCESS TO –1 is also the same, except hitting escape won’t terminate it.
>>
>>We’ve got 4 ways to make it try forever, but I can’t find any way to make it try just once, and then give up and return .F.
>>
>>According to help, nAttempts (as in SET REPROCESS TO nAttempts) specifies the number of times Visual FoxPro attempts to lock a record or file AFTER AN INITIAL UNSUCCESSFUL ATTEMPT, so SET REPROCESS TO 1 should try once initially, and then 1 additional time after the unsuccessful attempt, for a total of 2 tries.
>>
>>Amazingly, help gives an example for nAttempts = 30 which says that “Visual FoxPro attempts to lock a record or file up to 30 times”, NOT 31 times.
>>
>>So, which part of help is right? Will SET REPROCESS TO 1 actually give me what I want (a single attempt, then give up), or must I use a different approach, or is there no way to get there at all?
>>
>>Bob
>
>Hello Bob!
>
>Although I read Fred Taylor excellent answer, (in the future I will use it, too)
>SYS(3051) is usable too. This set the reprocess time interval. The minimum is 100 millisec. So, if SET REPROCESS TO 1, makes 1 additional try after an unsuccesfull locking, and you set reprocess time interval to 100 millisec, it is guaranted, that you get answer for locking whithin 100 millisec.
>
>BB

Hi Bela,
I knew of SYS(3051) to adjust the locking time, but for my purposes, 100 ms was way too long to wait. I only needed to know if a record was locked or not, maybe a couple of hundred records, so even a 100 ms wait would have amounted to 10's of seconds waiting, which was totally unacceptable in our app. With the SET REPROCESS TO 0 SECONDS, I can now check all the records in very short order.

I really wonder why it was changed from the way it used to work, which was when you had SET REPROCESS TO 1, it made a single try and did not wait at all! Now it makes the try, waits, and then decides it does not need to try again. Sometimes, these really subtle (and undocumented!) changes cause a ton of grief!
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform