Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a record *EVER* be locked by two or more users?
Message
From
06/04/1998 13:42:35
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00089886
Message ID:
00089902
Views:
29
>I just came out from a very drilling meeting where my co-workers were asking how would I deal with a situation where: what if 30 or 40 people pressed enter at the same time in our LAN or 200 people from the internet did so too(once we decide to make the connection), could any transaction ever get the same number, when this number is pulled from one table after the user succesfully locks the record? It's my understanding in my years working with the Fox that a record can only be locked by one person at a time. And that the command SET REPROCESS would take care of handling the queue to get their chance to access the next available number. Now, is Foxpro prepare to handle something like this or would I have to write routines that would basically handle this type of situation?. Where can I find existing documentation regarding this topic. Big THANKS in advance, I really need to get this out of my concern list.
>
>Gil

Following code will create the queue:
SET REPROCESS TO AUTOMATIC
select table
locate for ...  && find appropriate record
if rlock()=.f.
 =messagebox("Record is in use")
 return
endif
*** process the record (get number,etc.
unlock
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform