Subject Re: [IBO] Many dblookup combo
Author Helen Borrie (TeamIBO)
At 08:24 AM 08-08-02 +0000, you wrote:
>I'm starting with Firebird and IBO trial and I've a question, I've
>about 20 tables with 40 fields for each one, I need to place a
>IboDBLookUpCombo for many fields. There are two tables COMBO and
>DESCOMBO (description combo) with relation one-to-many. I need to
>place a lot of dblookupcombo for many fields, need I ib_query for
>every dblookupcombo? Thanks

You can't use TIB_LookupCombo for 1:Many relationships. They are for
lookup relationships which, in theory, are many-to-one, since many rows in
your Parent dataset can point to a single lookup value.

In a 1:Many relationship, the "Many" side of the rel'ship (detail) points
to the parent (master) via the MasterSource and MasterLinks
properties. Usually the master's primary key is the detail's foreign key,
although this doesn't have to be a declared FK in the database.

In a lookup rel'ship, the parent stores a key (a "lookup key", not its
primary key) which points to a single row in a lookup table. This is
usually the primary key of the lookup table. Typically, many parent rows
store the same key value, causing each parent row with the same lookup key
to seek and find the same lookup record. The lookup dataset makes the
relationship with the parent through its KeySource and KeyLinks properties.

A dataset can't specify both MasterSource and Keysource pointing to the
same parent set.

And, yes, in a keysource-lookup relationship (which TIB_LookupCombo
represents) you need one query for each relationship. However, you need a
master-detail setup to represent a 1:Many relationship.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at