Subject | Re: Stored Proc Problem |
---|---|
Author | spencerr99 |
Post date | 2003-09-21T15:11:07Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
other than the code I have sent you. All I do is call the generator
one time to get the new value. Remember, this code has worked fine for
months in Interbase, so it is not something I am doing.
Again, if I run this code in IBOConsole (Firebird):
select id from newrowid( 'person', 1);
I get a return value of say, 79. When I run it again, immediately
afterward, I get 81. The same thing occurs when running it though the
Firebird JDBC Interbase driver.
If I run the exact same code in IBConsole (Interbase) and the
Interbase JDBC InterClient driver, it works correctly. The problem is
clearly in the Firebird code.
wrote:
> At 03:48 AM 21/09/2003 +0000, you wrote:make that
>
> >Thanks for the help - it sort of works as a select (not a stored
> >proc), but has the unfortunate side effect of invoking the generator
> >(or the proc - I can't tell which) twice! So every call to the proc
> >effectively increments the step by two. Wierd.
>
> Not here it doesn't. And there is nothing in the code that would
> occur by magic on a different box. How/where are you using it? Fortrigger
> example, are you passing the value to a table with a Before Insert
> which invokes the same generator without checking whetherNEW.ThatValue is
> NULL?Nothing nearly that complicated. This very simple, I have done nothing
> heLen
other than the code I have sent you. All I do is call the generator
one time to get the new value. Remember, this code has worked fine for
months in Interbase, so it is not something I am doing.
Again, if I run this code in IBOConsole (Firebird):
select id from newrowid( 'person', 1);
I get a return value of say, 79. When I run it again, immediately
afterward, I get 81. The same thing occurs when running it though the
Firebird JDBC Interbase driver.
If I run the exact same code in IBConsole (Interbase) and the
Interbase JDBC InterClient driver, it works correctly. The problem is
clearly in the Firebird code.