Params confusion with Master\Detail
Posted: Wed 03 Jul 2019 09:23
Hi,
I found this case:
UniQuery1 (select * from TABLE_MASTER JOIN ...)
UniQuery2 in detail with UniQuery1 (via MasterSource and "select * from TABLE_DETAIL WHERE ID_MASTER = :ID")
UniQuery2 have also a complex SQLRefresh which I use to refresh JOIN fields to avoid calcFields.
Example:
REfreshSQL.Text := 'SELECT * FROM TABLE_DETAIL JOIN... JOIN.. WHERE ID = :ID';
When I do
UniQuery2.INsert;
UniQuery2.FielbByName...
UniQuery2.POst;
UniQuery2.RefreshRecord; <-<-<- Error
In this case the is that the Params property is used for SQLRefresh, too, so SQLRefresh in insert is going to fail.
Hope to be clear.
Thanks
Eddy
I found this case:
UniQuery1 (select * from TABLE_MASTER JOIN ...)
UniQuery2 in detail with UniQuery1 (via MasterSource and "select * from TABLE_DETAIL WHERE ID_MASTER = :ID")
UniQuery2 have also a complex SQLRefresh which I use to refresh JOIN fields to avoid calcFields.
Example:
REfreshSQL.Text := 'SELECT * FROM TABLE_DETAIL JOIN... JOIN.. WHERE ID = :ID';
When I do
UniQuery2.INsert;
UniQuery2.FielbByName...
UniQuery2.POst;
UniQuery2.RefreshRecord; <-<-<- Error
In this case the is that the Params property is used for SQLRefresh, too, so SQLRefresh in insert is going to fail.
Hope to be clear.
Thanks
Eddy