I'm using the VFP 9 framework Visual Promatrix which relies on the Last Save 
method.  I have run into a situation where this doesn't work for me.  In 
particular, the scenario I'm dealing with is Inventory On Hand.  I'm using 
local views with the hope of moving to SQL in the future.  Here's some pseudo 
code:

ThisForm.oVPMDataHandler.RequeryView("styles_updateqty_v",@dlaFilters2)

SELECT styles_updateqty_v

REPLACE styles_updateqty_v.nonhand WITH styles_updateqty_v.nonhand + 1

gnSaveCode = ThisForm.oVPMDataHandler.SaveRecord("styles_updateqty_v",.F.)

The problem is I've had two users Requery at the same time and get the same On 
Hand starting value.  One user adds a quantity while the other user subtracts a 
quantity.  This causes my On Hand value to be incorrect.  In the old days, I 
would first Lock the Record, change the value and then Unlock the Record.  I 
know I can't lock a view/SQL.  
How do I go about making sure only one user gets the current On Hand value 
while the other user must wait until the first user is finished before getting 
next On Hand value when dealing with local views?  Thanks for any advice you 
can give me!

James Trogdon



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to