Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-user access problem
Message
 
To
24/02/1998 07:24:37
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00080726
Message ID:
00080728
Views:
23
>I have developed an application (VFP 5.0) managing company stack,
>invoices, customers and so on. I want it to be used in the network
>(Win95 peer-to-peer), running on several machines simoultanously and
>accessing the same data.
>
>I encountered a problem with solving update conflicits.
>A good example may be a ware stock.
>
>I use Record Bufforing for managing my stock table. When an operator
>decides to save entered data I issue TABLEUPDATE(.T.,.F.).
>
>The problem arises when two operators manipulate the stock of the same
>item simultanously. For example one of them is doing an invoice and
>selling the item to somebody, another one is entering a delivery of the
>same item to the stock. Than only last operation is saved and the final
>quatity of the item on stock in wrong.
>
>Actually the basic problem is how one station can read changes made to
>the data by another station. Something like SET REFRESH would do, but
>this is only for browse window as far as I know.
>
>Code sample:
>Assumption: at the beginning table1.field1 = 0;
>
>Oper1: use table1
>Oper1: cursorsetprop("Buffering",3) && record buffering on
>
>Oper2: use table1
>Oper2: cursorsetprop("Buffering",3) && record buffering on
>
>Oper1: replace field1 with 10 in table1
>Oper1: TableUpdate (.T.,.F.,"table1")
>
>Oper2: replace field1 with table1.field1+5 in table1 && intend to
>increase field1 for 5 (e.g. delivery)
>Oper2: TableUpdate (.T.,.F.,"table1")
>
>Oper1: ? field1 && displays 10
>
>Oper2: ? field1 && displays 5
>
>Oper1: use && closing files
>
>Oper2: use
>
>Oper1: use table1
>Oper1: ? field1 && displays 5, the operation done by Oper1 is missed.
>Proper result would be 15
>
>
>Thanks for help in advance!
>Marcin Konopka
>
>=====================================
>Marcin Konopka
>MSc in Adv. Computer Science student
>of the University of Birmingham, UK
>-------------------------------------
>e-mail: M.Konopka-ACS97@cs.bham.ac.uk
>Web: http://www.cs.bham.ac.uk/~mqk
>ICQ no.: 4452449
>=====================================



Is the data being flushed from the other terminal (FLUSH) ? If this is the case
you should be in receipt of the most uptodate data from your table.
Previous
Reply
Map
View

Click here to load this message in the networking platform