Subject | Re: [IBO] Auto-Incrementing Key Field |
---|---|
Author | Frank Ingermann |
Post date | 2002-10-13T19:30:10Z |
Hi Jack,
Jack Cane wrote:
( entries in the form "mytable.myidcolumn=mygeneratorname" )
- if you have a "Before Insert" trigger on that table, does it have
"if ((myidfield is null) or (myidfield=0)) then
myidfield = gen_id(myidgenerator,1);"
in it?
(take a look at http://www.fingerbird.de/generatorguide.htm for more detailed
info on the subject of autoinc fields in Fb/IB, esp. with IBO.)
hth,
fingerman
--
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de
Jack Cane wrote:
> I have configured the key field as an auto-incementing integer. I have it- did you set the GeneratorLinks property accordingly?
> hooked to a tdbEdit whose read-only property is set to true. When I press
> the 'Post' button of my tdbNavigator an exception is raised with message,
> "(Field name) is a required field".
>
> I can write some code to update the tdbEdit, but that defeats the purpose of
> the auto-incrementing feature. Is there a property to be set, which
> automates this process?
>
> tks,
>
> jwc
( entries in the form "mytable.myidcolumn=mygeneratorname" )
- if you have a "Before Insert" trigger on that table, does it have
"if ((myidfield is null) or (myidfield=0)) then
myidfield = gen_id(myidgenerator,1);"
in it?
(take a look at http://www.fingerbird.de/generatorguide.htm for more detailed
info on the subject of autoinc fields in Fb/IB, esp. with IBO.)
hth,
fingerman
--
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de