Subject | Re: call Generator from Java-Code |
---|---|
Author | roelofsen2003 |
Post date | 2003-11-12T10:25:25Z |
--- In Firebird-Java@yahoogroups.com, "Ruslan Cheremin" <cheremin@m...
> wrote:THANKS! This is exactly what i needed :-)
> --- 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.