John,
Hang in there. ..
>
> I am working in the detail area of an invoice module. I have three tables
> I am working with: InvHead, InvDetail, and Inventory. InvHead is related
> to InvDetail by InvNo; InvDetail is related to Inventory by PartNo. (Sound
> familiar??) The invoice head to invoice detail is working OK, but I can't
> get the part # to behave:
>
> A. If I SEEK the txtPartNo.Value IN Inventory, it flushes the buffer
> (Buffering = 5) so I cannot TABLEREVERT() and, when I try to input the
> quantity, I get a Record is in use by another user error message. (I am on
> a stand-alone computer.)
Can you duplicate this interactively?
Is this an inventory buffer or invlines buffer?
Is the seek used to verify/fetch a description, or is the inventory
table modified at the same time? With optimistic table buffering
indexes aren't updated until tableupdate() succeeds.
> B. If I do not SEEK, the quantity and TABLEREVERT() behave, but I get the
> wrong inventory description and price.
>
> I am verifying the existence of the Part # in a separate class
> (oInvoice.FindItem) with another copy of Inventory.
How is it opened? Is it opened in the Data Environment of the
oInvoice class? VFP seems to "inherit" usage status from previous
openings of a table. (There was a recent FP Advisor or FoxTalk
tip/article on this.)
Are you sure the verifiction is being done on the oInvoice copy of
Inventory?
>That works fine;
> however, I have to move the pointer in the copy of Inventory that the form
> has open. How can I accomplish that without flushing the buffers????
Why do you have to move it?
Have you thought of doing your manipulation of the Inventory table in
an update trigger on InvLines?
These are all shots in the dark, but I hope they help.
Regards - Miles Thompson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Miles Thompson CQA Consulting Group
mthompso@fox.nstn.ca P.O. Box 82
Voice - (902) 883-1010 Enfield, NS
Fax - (902) 883-8586 Canada B2T 1C6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~