Subject | Re: [IBO] MasterLinks |
---|---|
Author | Helen Borrie |
Post date | 2005-01-11T08:24:19Z |
At 05:39 PM 11/01/2005 +1100, you wrote:
on demand. I just write a drop-dead simple procedure, like the following:
procedure MyDm.SwapLinks(Child: TIB_Dataset; ParentSource: TIB_Datasource);
begin
with Child do
begin
if MasterSource = ParentSource then Exit;
Close;
if MasterSource <> nil then
MasterSource := nil;
MasterSource := ParentSource;
// write and call another procedure to apply new MasterLinks if required)
Open;
end;
end;
Helen
>If I have a query which must acquire a master links (FK) from 2 separateNot simultaneously. But there's nothing to stop you swapping datasources
>sources, how do I do this with only on MasterSource property? I was sure I
>could do this but I clean forget now.
on demand. I just write a drop-dead simple procedure, like the following:
procedure MyDm.SwapLinks(Child: TIB_Dataset; ParentSource: TIB_Datasource);
begin
with Child do
begin
if MasterSource = ParentSource then Exit;
Close;
if MasterSource <> nil then
MasterSource := nil;
MasterSource := ParentSource;
// write and call another procedure to apply new MasterLinks if required)
Open;
end;
end;
Helen