Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying data from a FIELD/TABLE to another FIELD/TABLE.

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA

I use Interbase 6 SQLServer in conjunction with Delphi 6 Enterprise.

I need to copy the data from (field) P_NO in (table) PARENT into (field) P_NO in
(table) TRNSFR.

Can someone please tell me how to do this?

I might mention the following:

1.
I have a 3-Tier application with a DataBase (PCHILD.gdb ecapsulating tables PARENT
(with fields P_NO PNAME and C_NO) and table TRNSFR with the same fields. I also have an
IB6 ApplicationServer in place and running.

2.
In the ThinClient I have a DataModule wherein I access the DataBase using (interalia)
TIBDataSet (IBFatherDataSet), TDataSource (dsFather), TIBDataSet (IBdsTrnsfr),
TDataSource (dsTrnsfr).

3.
ModifySQL Property on IBdsTrnsfr is set to default:

Update TRNSFR
set
P_NO =:pARENTP_NO

4.
In my effort to create what I need I have an IBFatherDataSet AfterScroll Event:

procedure TParentDM.IBFatherDataSetAfterScroll(DataSet: TDataSet);
begin
IBFatherDataSet.ModifySQL.Clear;
IBFatherDataSet.ModifySQL.Text := 'UpdateTRNSFR + set + P_NO =:pARENTP_NO';
end;

The project compiles but during RUNTIME UponCreate (of the DataModule) the above procedure
(being triggered thereby) causes only the FIRST record in PARENT to display in a grid
along with the values in P_NO and C_NO - but the PNAME field merely displays a single-pipe
symbol.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top