Subject | Re: Is some API to get generator value? |
---|---|
Author | emb_blaster |
Post date | 2011-04-11T19:56:26Z |
--- In firebird-support@yahoogroups.com, "karolbieniaszewski" <liviuslivius@...> wrote:
AFAICR, no. There's not.
If you are using ISQL, you could use "SHOW GENERATOR xxxxx;" or "SHOW SEQUENCE xxxxxx;", or yet "SHOW GENERATORS;" or "SHOW SEQUENCES;" to list all. (see http://www.firebirdsql.org/refdocs/langrefupd21-ddl-sequence.html)
Also, I can agree that seems make no sense at all that. But I've learned to do not call stupid something I did not understand at all. Maybe in the time it was made, a "no transaction request" would make no sense too.
So, if someone else could explain, I would be glad to learn too. But don't think this is a bug or a missing feature at all. :)
regards
>As no one answered this so far...
> Hi
>
> is some API to get generator value?
> or only possible way is
> select GEN_ID(gen_name, 0) from RDB$Database
>
> i ask because this is stupid to start transaction to get non transactional object value
>
> Karol Bieniaszewski
>
AFAICR, no. There's not.
If you are using ISQL, you could use "SHOW GENERATOR xxxxx;" or "SHOW SEQUENCE xxxxxx;", or yet "SHOW GENERATORS;" or "SHOW SEQUENCES;" to list all. (see http://www.firebirdsql.org/refdocs/langrefupd21-ddl-sequence.html)
Also, I can agree that seems make no sense at all that. But I've learned to do not call stupid something I did not understand at all. Maybe in the time it was made, a "no transaction request" would make no sense too.
So, if someone else could explain, I would be glad to learn too. But don't think this is a bug or a missing feature at all. :)
regards