Subject | RE: [firebird-support] Generators don't works anymore |
---|---|
Author | Tommi Prami |
Post date | 2007-12-19T16:23:01Z |
Hello,
we had some trouble with Application code with FB2.x generators, needed to
do some fixing. I thnik we use direct SQL to get new generator Value (not
the trickers or Stored Procs).
There was some kind of tighter validation thingy in 2.x (meaninf 1.X was
happy with SQL that was not apsolutely correct) I just don't know what it
actually was. If someone (here) remembers I'll post more information...
-TP-
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Martijn Tonies
Sent: 17. joulukuuta 2007 21:13
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Generators don't works anymore
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. <http://www.upscene.com> com
My thoughts:
http://blog. <http://blog.upscene.com/martijn/> upscene.com/martijn/
Database development questions? Check the forum!
http://www.database <http://www.databasedevelopmentforum.com>
developmentforum.com
[Non-text portions of this message have been removed]
we had some trouble with Application code with FB2.x generators, needed to
do some fixing. I thnik we use direct SQL to get new generator Value (not
the trickers or Stored Procs).
There was some kind of tighter validation thingy in 2.x (meaninf 1.X was
happy with SQL that was not apsolutely correct) I just don't know what it
actually was. If someone (here) remembers I'll post more information...
-TP-
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Martijn Tonies
Sent: 17. joulukuuta 2007 21:13
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Generators don't works anymore
> 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. <http://www.upscene.com> com
My thoughts:
http://blog. <http://blog.upscene.com/martijn/> upscene.com/martijn/
Database development questions? Check the forum!
http://www.database <http://www.databasedevelopmentforum.com>
developmentforum.com
[Non-text portions of this message have been removed]