Problem adding record

I create a TOracleDataset with the following select statement:

select a.*, a.rowid, b.itemno
from imc.qa_deviations a, iqms.arinvt b
where b.id = a.shipping_arinvt_id
order by start_date desc

I do this because I store only the link to table arinvt, not the data that's in the table. I'm trying to display this query in a grid, but also allow the user to edit the data via data controls.

When I attempt to insert a new record, I get the error "Field 'ITEMNO' must have a value", which doesn't make sense to me because it doesn't exist in the updatable table.

Further, I do EXACTLY the same thing (different tables) in another application, and it works perfectly. Any ideas?
 
The ITEMNO field should be an fkInternalCalc field, because it does not belong to the updating table. You can either explicitly set the FieldKind property if you are using persistent fields, or you can set TOracleDataSet.Dictionary.FieldKinds to True. In that case the FieldKind will automatically be determined.

------------------
Marco Kalter
Allround Automations
 
Thanks for the quick reply. My question here is also: Why does my other statement work, when I did nothing to make it do so? It's just been sort of confusing.

I will give this a try and see how it works.
 
Back
Top