Subject Re: [IBO] TIB_Query with master link not allowing updates
Author Steve Fields
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 03:54 PM 25/08/2004 +0000, you wrote:
> >All,
> > I have a problem with a query where it will not allow
> >updates/inserts, etc when the masterkey is defined.
> >
> >In the SQL statement I use:
> >SELECT * FROM INVOLVE
> >
> >In the KeyLinks field:
> >COUNTER
> >
> >A generator:
> >COUNTER=G_INVOLVE
> >
> >In the MasterLinks field:
> >MASTERID=MASTERID
> >
> >When I set this up I am unable to get the records to
> >allow an insert (the set is empty). If I use the SQL
> >statement:
> >SELECT * FROM INVOLVE WHERE MASTERID = :MASTERID
> >it will allow edits, but I am then unable to link it
> >to the Master set that I need to use.
> >What am I missing?
>
> a) MASTERID in the master set isn't unique, or has nulls?
Master table is MASTERID, primary key is MasterID, non-null,
Detail table is INVOLVE, primary key is COUNTER, non-null
(Detail table has field MASTERID in it, MasterLink'd to
MASTERID table in MasterLinks as MASTERID=MASTERID with
the mastersource set to the MASTERID table's source)

> b) Master set is joined and you don't have KeyLinks for it?
Only Masterlinks set, (KeyLinks only set with the primary key in
INVOLVE: COUNTER as an integer)

> c) Both?
Yes

> d) Master set comes from an unkeyed table?
Both tables are keyed: MASTERID for table MASTERID,
COUNTER for table INVOLVE


> >IB4.3Aa, XP Pro, TIB_Query/TIB_Datasource/TIB_Connection
>
> Now I'm *really* going to bed.
>
> Helen