Subject Re: Stored Proc Problem
Author spencerr99
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 03:48 AM 21/09/2003 +0000, you wrote:
>
> >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
make that
> occur by magic on a different box. How/where are you using it? For
> example, are you passing the value to a table with a Before Insert
trigger
> which invokes the same generator without checking whether
NEW.ThatValue is
> NULL?
> heLen

Nothing nearly that complicated. This very simple, I have done nothing
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.