Subject Re: call Generator from Java-Code
Author Ruslan Cheremin
--- In Firebird-Java@yahoogroups.com, "roelofsen2003" <info2@t...>
wrote:
> Hi!
>
> Is there a way to call a generator from my java code? I´m using
> several generators for my primary-key-columns and i must know the
ids
> to setup my 1-n relations.
>
> As i know, firebird doesn´t support st.getGeneratedKeys() so i
think
> calling a generator before insert is the easiest way. Or not?
>
> Thanks,
>
> Roman

You can get value from generator executing SQL query like this:
SELECT GEN_ID(genName,1) from RDB$DATABASE

Ruslan.