How does one copy data from a field (say P_NO) in a Table (say CHILD) of an SQLDataBase (say PCHILD.gdb) into a field (say P_NO) in a Table (say TRNSFR) of an SQLDataBase say PCHILD.gdb)?
update TRNSFR
set
P_NO = CHILDP_NO.VALUE
where
ID = ID
it will update in table TRNSFR the field P_NO with the value
from Child where ID = ID.
The best to perfom this is to fill the sql query at run time just before the execution of the query.
I have a TDataModule (dmData) (in a ThinClient) on which I have
TDCOMConnection1 hooded to a (running) ApplicationServer.
TClientDataSet which is hooked to above a via the Remote Server Property.
TDataSource (dsFather) which is hooked to the TIBdataSet below.
TIBTransaction (IBFatherTrans) " " TIBDataBase below
TIBDataBase (IBFatherDBase) " " C:\h\PChild\Tables\PCHILD.GDB
TIBdataSet (IBFatherDataSet) " " TIBTransaction above.
In the SelectSQL Editor of the TIBdataSet I have the following
SELECT *
FROM PARENT
In addition I have
TIBdataSet (IBTrnsfrDataSet) with the DataBase property set to IBFatherDbase above.
DataSource propery set to dsFather above.
In the SelectSQL Editor I have the following.
update TRNSFR
set
C_NO =:CHILDC_NO
where
P_NO =_NO
I have a TForm with a TDBGrid which is hooked to dsFather above via the DataSource Property.
The project compiles but the value of P_NO in TABLETrnsfr of the above DataBase
(PChild) remains unaffected by the following. What am I missing?
procedure TdmData.IBFatherDataSetAfterScroll(DataSet: TDataSet);
begin
with dmData do
begin
if dsFather.state in dsEditModes then
else
dsFather.Edit;
IBFatherDataSet.Post;
end;
end;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.