Cannot insert a row in a query that use 2 tables

ziller

Member²
hello,

i'm using DOA 4 beta

here is my query :

select pgs.rowid, pgs.*, p.nom_pers, p.prenom_pers
from GT_PERS_GERE_SERV pgs, GT_PERSONNEL p
where cod_serv = :cod_serv
order by NOM_PERS, PRENOM_PERS

i have the updating table property to GT_PERS_GERE_SERV

the problem is that when i insert a row into this dataset DOA try to insert the data of NOM_PERS and PRENOM_PERS.
this fields are not in the GT_PERS_GERE_SERV

is it possible to do that without using the onapplyrecord event? In fact, as far as i can remember it seems that it worked with DOA 3...

regards
 
The 2 joined fields from the secondary table should be setup as fkInternalCalc field. Otherwise the dataset will include them in inserts and updates.

You can either do so explicitly by making the fields persistent, or you can set TOracleDataSet.OracleDictionary.FieldKinds to True.

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