>>>Hi John,
>>>
>>>TableUpdate() is probably returning false. You should probably never do an =TABLEUPDATE() and instead do an IF TABLEUPDATE() to see if it takes. If the table update is failing, do an =AERROR(laError) and look at the laError array to see what went wrong.
>>
>>Hey Mike, I'm back with the same problem. You're right =TABLEUPDATE() is indeed failing although I can't understand why. I've done =AERROR(laError) but the error says "Table buffer for alias 'vclientcosts' contains uncommitted changes." I know it contains uncomitted changes, that's why I'm issuing a =TABLEUPDATE() to update it! I feel like I'm going around in circles sometimes. How can I get to the real reason why it's failing?
>
>Could you post the piece of code where you are attempting a save. :)
>
>Dan
No problem if it helps :) This is it:
SELECT vClientCosts
FOR i=1 TO ALEN(THISFORM.aCostCopy,1)
INSERT INTO vClientcosts (codeid, qty, cost, med_cost, typeid, ;
clientid, pub_id) VALUES ;
(THISFORM.aCostCopy[i,1], THISFORM.aCostCopy[i,2], ;
THISFORM.aCostCopy[i,3],;
THISFORM.aCostCopy[i,4], THISFORM.aCostCopy[i,5], ;
clients.clientid, vPubs.Pub_id)
NEXT
IF NOT TABLEUPDATE(.T.)
= AERROR(laError)
DEBUG
ENDIF
= REQUERY()
aCostCopy is a form-level array property that holds the values to be copied in, clients is one of the table and vPubs is another view. The values in them are correct and is not part of the problem. Do you see anything?
It's "my" world. You're just living in it.