Subject Re: [IBO] Design question about master (master?) detail relation
Author Lucas Franzen
Marco,

Table B:
MasterSource=Datasource of Table A

Masterlink:
B.FKFIELD=A.PRIMARYKEYFIELD

Table C:
MasterSource=Datasource of Table B

And add TWO ENTRIES (just two lines) in the masterlink:
C.FKFIELD_B=B.PRIMARYKEYFIELD
C.FKFIELD_A=B.FOREIGNKEYFIELD (of Table A)

(Untested)

HTH
Luc.

mmenaz@... schrieb:
>
> Hi, I've 3 tables, A that is sure the master one, B that is detail
> respect to A, and C that is a detail for the A and B current row,
> i.e.
> the A+B primary key are the foreign key for the C detail table.
> Since the TIB_Query has only one possible reference for a master
> datasource, what is the best way, eventually better code location,
> for
> solving this problem?
>
> Think something like:
> A customer table
> B logical places (i.e. home, office, parents, mobile)
> C telephone numbers
> So Mary at home has 3 rows of telephone numbers
> Mary at office has 2 numbers
> Mary has one mobile phone number
>
> C (mary) B C
> |----------- home -------800 2554444
> | |----------750 0045444
> | |----------544 4445454
> |
> |----------- office -----450 5554444
> | |----------754 0455554
> |
> |---------- mobile ------477 5554444
>
> So in the first IB_Grid I select Mary, then in the second I select
> office, and the 3° shows me her office telephone numbers...
>
> Thanks
>
> Marco Menardi
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/