Subject RE: [IBO] MasterLinks
Author Alan McDonald
> >If I have a query which must acquire a master links (FK) from 2 separate
> >sources, how do I do this with only on MasterSource property? I
> was sure I
> >could do this but I clean forget now.
>
> Not simultaneously. But there's nothing to stop you swapping datasources
> 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

thanks Helen - that's a swap - but I need a simultaneous twin datasource :-)
I think I must have just done it manually before.
Alan