Subject | RE: [IBO] Firebird Generated Keys as Master / Slave Links and IBO Controls |
---|---|
Author | Jason Wharton |
Post date | 2006-12-01T18:59:49Z |
George wrote:
your queries.
the surrogate key column and IBO will take care of providing values for your
keys. Just be sure your triggers do not overwrite the values IBO retrieves.
Check for NULL before applying a value in a trigger.
You can make a setting at the TIB_Connection.GeneratorLinks level and it
will be applied for all datasets on that connection, or you can isolate a
setting in your dataset GeneratorLinks property.
Jason Wharton
> We have converted an old BDE App to Firebird using IBO components.The surrogate keys (that's what I call them) should still be included in all
>
> 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 generated by
> a Firebird Generator, we now have linking problems.
>
> From what we understand, for a field to be populated by a generator
> it must be left out of the IBO query SQL statement. If this is so
> then the query doesn't have it and cannot use it as a linking field
> in a master/slave relationship.
your queries.
> Can anyone point us to a document that will enlighten us on Master /Is all you need to do is put a setting in the GeneratorLinks property for
> Slave relationships using generator populated fields as the key?
the surrogate key column and IBO will take care of providing values for your
keys. Just be sure your triggers do not overwrite the values IBO retrieves.
Check for NULL before applying a value in a trigger.
You can make a setting at the TIB_Connection.GeneratorLinks level and it
will be applied for all datasets on that connection, or you can isolate a
setting in your dataset GeneratorLinks property.
> The samples are in Delphi and we are using C++ so can't access them.This is something I hope to remedy at some point.
Jason Wharton