Subject | Re: [IBO] Master Detail with IBODataset |
---|---|
Author | Helen Borrie |
Post date | 2003-11-20T23:42:32Z |
At 01:37 PM 20/11/2003 -0500, you wrote:
With both TQuery and TIBOQuery you do the following:
Set the detail query's DataSource property to the TDatasource of the master
table.
If the foreign key column(s) of the detail have the same name(s) as the
primary key column(s) - the keylinks - of the master table, then you are done.
If not, then you have to add a parameterised WHERE clause to the SQL of the
detail, e.g.
select <fieldlist> from mydetail where myfkeyfield = :the_master_pri_key
Now it's all done.
Helen
>Lee Jenkins wrote:No, it is the *same* as TQuery.
>
> > Hi,
> >
> > It appears that setting this up is different than standard dataset
> > behavior because I see no MasterKey field property, etc.
> >No, Keylinks is not for this.
> > Would someone kindly provide an example of syntax to use to setup MD
> > relationship on a form?
> >
> > I am assuming the KeyLinks property is for this....
With both TQuery and TIBOQuery you do the following:
Set the detail query's DataSource property to the TDatasource of the master
table.
If the foreign key column(s) of the detail have the same name(s) as the
primary key column(s) - the keylinks - of the master table, then you are done.
If not, then you have to add a parameterised WHERE clause to the SQL of the
detail, e.g.
select <fieldlist> from mydetail where myfkeyfield = :the_master_pri_key
Now it's all done.
> >TIBOTable behaves like TTable, TIBOQuery behaves like TQuery.
> >
>
>Hmmm. Looks like I cannot do this with an IBOQuery, only the TIBOTable...
Helen