Subject | Re: [IBO] Firebird Generated Keys as Master / Slave Links and IBO Controls |
---|---|
Author | George |
Post date | 2006-12-04T15:46:38Z |
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...>
wrote:
Many thanks but what do you mean by 'settings' and should they be in
the master or slave? (Or if only in the transaction - what settings?).
I tried including the generated field in the query and that produces
an error message, obviously the control checks the NOT NULL and
throws an exception before the trigger fires and the generator has a
chance to populate the field.
The trigger itself checks for NULL in accordance with the Bible
(Helen's book).
What I suppose I am really after is a user guide so we don't have to
keep bothering you.
George
wrote:
>generated by
> George wrote:
> > We have converted an old BDE App to Firebird using IBO components.
> >
> > We now want to optimise the app to get the benefit of the combined
> > Firebird / IBO functionality.
> >
> > Our problem concerns generators - specifically, having gone to
> > primary keys having no logic in the real world but being
> > a Firebird Generator, we now have linking problems.generator
> >
> > From what we understand, for a field to be populated by a
> > it must be left out of the IBO query SQL statement. If this is sofield
> > then the query doesn't have it and cannot use it as a linking
> > in a master/slave relationship.included in all
>
> The surrogate keys (that's what I call them) should still be
> your queries.Master /
>
> > Can anyone point us to a document that will enlighten us on
> > Slave relationships using generator populated fields as the key?property for
>
> Is all you need to do is put a setting in the GeneratorLinks
> the surrogate key column and IBO will take care of providing valuesfor your
> keys. Just be sure your triggers do not overwrite the values IBOretrieves.
> Check for NULL before applying a value in a trigger.and it
>
> You can make a setting at the TIB_Connection.GeneratorLinks level
> will be applied for all datasets on that connection, or you canisolate a
> setting in your dataset GeneratorLinks property.them.
>
> > The samples are in Delphi and we are using C++ so can't access
>Jason
> This is something I hope to remedy at some point.
>
> Jason Wharton
>
Many thanks but what do you mean by 'settings' and should they be in
the master or slave? (Or if only in the transaction - what settings?).
I tried including the generated field in the query and that produces
an error message, obviously the control checks the NOT NULL and
throws an exception before the trigger fires and the generator has a
chance to populate the field.
The trigger itself checks for NULL in accordance with the Bible
(Helen's book).
What I suppose I am really after is a user guide so we don't have to
keep bothering you.
George