Subject | Re: [firebird-support] Generators don't works anymore |
---|---|
Author | Martijn Tonies |
Post date | 2007-12-17T19:13:04Z |
> Sean:And if you do it again? Does the value increase?
> this is the code:
>
> // -------------------------------------------------------
>
> CREATE OR ALTER trigger comuni_bi for comuni
> active before insert position 0
> as
> begin
> if (new.mycode is null) then
> new.mycode = gen_id(gen_comuni_id,1);
> end
>
> // ----------------------------------------------------------
>
> Martijn:
> if I do:
>
> select gen_id( gen_comuni_id,1 ) from rdb$database
>
> Give Me GEN_ID=1
It probably does. It really has to be in your application code
or trigger code.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com