Subject Re: [firebird-support] Re: Connection with Open Office 2
Author Ann W. Harrison
George P Boutwell wrote:
>
>
> GEN_ID(GENERATORNAME, 1) or maybe even SELECT GEN_ID(GENERATORNAME, 1) FROM
> RDB$DATABASE for Auto-Increment statement AND
> SELECT GEN_ID(GENERATORNAME, 0) FROM RDB$DATABASE for Query of generated
> values?

That's not reliable and has the awkwardness of becoming unreliable only
under multi-user load, so it doesn't show up in testing.
>
> Alternatively you can create a Stored Procedure that takes an argument (in
> this case Integer that will be 1 for the first and 0 for the second) that
> does the same thing and execute/select from the Store Procedure...
> Technically the SP approach is less likely to break in the future.
>
And more likely to get the right result.

Regards,


Ann