I am using Delphi 6 Enterprise and Interbase 6 and have a working model of a 3-Tier system.
Can anyone please tell me why I get the following exception at point "A" below even
though ChildrenDM HAS been declared in the Uses clause of TParentDM?
'Access violation at address 004CBE2C in module 'MDModel.exe'.
Read of address 00000058'.*)
procedure TParentDM.IBFatherDataSetAfterScroll(DataSet: TDataSet);
begin
with ParentDM.IBFatherDataSet do
begin
ParentDM.IBdsTrnsfr.Active := True;
if ParentDM.IBdsTrnsfr.state in dsEditModes then
else
ParentDM.IBdsTrnsfr.edit;
ParentDM.IBdsTrnsfrP_NO.value := ParentDM.IBFatherDataSetP_NO.value;
ParentDM.IBdsTrnsfr.ApplyUpdates;
with ChildrenDM.IBdsChild do .................................A
begin
ChildrenDM.IBdsChild.SelectSQL.Clear;
ChildrenDM.IBdsChild.SelectSQL.Add('select *');
ChildrenDM.IBdsChild.SelectSQL.Add('from');
ChildrenDM.IBdsChild.SelectSQL.Add('CHILD t1,TRNSFR t2');
ChildrenDM.IBdsChild.SelectSQL.Add('where');
ChildrenDM.IBdsChild.SelectSQL.Add('t1.P_NO = t2.P_NO');
end;
Thanks in advance.
Terry.