Subject Re: [IBO] A Correct way for browse and detail queries with IBO
Author Helen Borrie
At 12:55 AM 13/11/2003 +0100, you wrote:
>At 2003-11-12 16:05, you wrote:
> >Master-detail is ideal for this kind of 1:1 relationship if it's a big
> >table. If the BUYERS table is only small, say less than 200 rows all up,
> >you can use the same dataset for both the selector and the detail. Use a
> >single datasource and link both the selector grid and the detail controls
> >to it.
>
>Helen, could you provide an example with one datasource & query component
>for master-detail relation? I'm interested with such IBO feature

It's not an IBO feature particularly - it's perfectly standard Delphi. I'm
fairly sure there's at least one example in the file of bits and pieces on
the Contributed Code page, in the Samples and Solutions section, by my
name. (That stuff isn't glamorous - it was a series of little projects I
built to create the screenshots for the original GSG...)

It is so simple to do that it would be easier for you just to DO it. Just
set up your dataset, e.g. select * from employee, if you like. Set up the
attributes so that the grid displays only the EMP_NO (READ ONLY) and the
FIRST_NAME and LAST_NAME. In a panel, lay down data-aware edit components
for each column you want in the "detail" display. Drop a navigation bar in
as well. Set the datasource's dataset property and set all of the controls
to use that datasource.

But please note that this technique is not good to use on a big dataset,
for all the usual reasons why it's not good to put a big dataset in a
grid. The master-detail technique is the only right way to handle large sets.

Helen