Update just one table in a joined select

Hello,
I summarize the problem :

I have a Delphi form with
One DBEdit linked to a field from T1 (see query below)
One DBlookupcombobox linked to T2 (see query below)

Both are connected to a OracleDataset set to cachedupdate := true with something
like
select T1.rowid, T1.*, T2.*
from T1, T2
where T1.pk = T2.FK

When I "ApplyUpdates", i just want to update fields from T1 (with DBEdit) and avoid to update field eventually modified by using the DBlookupcombobox (I perform this updade with anothequery).

When I "ApplyUpdates", with some modified values from T2, the update obviously failed becaude the update try to update a field from T2 in T1.
How to update just the fields from T1 and avoid T2's fields update ?
Thanks for your help.

------------------
Bruno ETIENNE
www.beaconseil.com
 
You can either set the FieldKind property all fields of table T2 to fkInternalCalc, or you can enable the TOracleDataSet.Dictionary.FieldKinds option. In that case the dataset will determine which fields belong to the updating table, which costs an extra query when the dataset is opened first.

------------------
Marco Kalter
Allround Automations
 
Back
Top