Subject | Re: [firebird-support] Re: Generators don't works anymore |
---|---|
Author | Aage Johansen |
Post date | 2007-12-17T21:10:40Z |
amoradell wrote:
However:
gen_id(gen_comuni_id,0) will always give the current
value of gen_comuni_id.
gen_id(gen_comuni_id,1) will increase the value and
return the new value.
try
select gen_id(gen_comuni_id,1) from rdb$database
a couple of times - the value should increase by 1 for every call.
If your program doesn't work, the probable reason is that the trigger
is never - well - "triggered".
--
Aage J.
> Hi,Your selects cannot work - wrong syntax.
>
> 1 - select (gen_comuni_id,0) from rdb$database : value
> 2 - insert record in columni without value for mycode
> 3 - select (gen_comuni_id,0) from rdb$database : value
> should have changed !
>
However:
gen_id(gen_comuni_id,0) will always give the current
value of gen_comuni_id.
gen_id(gen_comuni_id,1) will increase the value and
return the new value.
try
select gen_id(gen_comuni_id,1) from rdb$database
a couple of times - the value should increase by 1 for every call.
If your program doesn't work, the probable reason is that the trigger
is never - well - "triggered".
--
Aage J.