Subject Re: [IBO] OK to Set MasterLinks at run time?
Author Jason Wharton
I'm not sure what your problem here is. It should work if you call the Open
Have you watched in the SQL trace to see what is actually happening?

Jason Wharton
CPS - Mesa AZ

----- Original Message -----
From: <andrewgarner@...>
To: <>
Sent: Friday, May 18, 2001 8:14 AM
Subject: [IBO] OK to Set MasterLinks at run time?

> I'm having difficulty when setting IB_Query.MasterLinks
> and .MasterSource at run time. (My motivation is to re-use existing
> datasets, rather than let them proliferate too much).
> The links give the expected results when I set them in the query
> editor in the IDE, but when I try the same thing through code at
> runtime the detali dataset seems to stay closed.
> Here's my most recent iteration (Address is the Master and JobHeader
> the Detail, ie there can a many jobs for one address):
> qryAddress.Close;
> qryJobHeader.Close;
> qryJobHeader.MasterLinks.Clear;
> qryJobHeader.MasterSource := nil;
> qryJobHeader.MasterLinks.Add('JobHeader.AdId=Address.AdId');
> qryJobHeader.MasterSource := dtsAddress;
> qryAddress.Prepare;
> qryAddress.Open;
> qryJobHeader.Prepare;
> qryJobHeader.Open;
> I just need a shove in the right direction please - should this work
> or not? are there other / better techniques? should I just use more
> datasets? do I need the Close/Reopen?
> Many Thanks, Andy Garner
> Your use of Yahoo! Groups is subject to