Subject Re: [Firebird-Java] Autoincrement Values with Open-Office via jdbc
Author Roman Rokytskyy
> I want to switch from MS Produkts to Open-Source and one of my
> favorites is Firebird with open-office as backend via jdbc.
> No I have one great problem, Open-office is not able to fetch
> autoincrement values from Firebird.
> Any Ideas?

Firebird does not have autoincrement fields. You can mimic it with triggers
and generators, but Firebird does not provide any means to access the value
assigned to the column. There are two possible solutions:

a) fetch next value using SELECT gen_id(generatorName, 1) FROM rdb$database;
that gives you value of the "auto-increment" field, then you have to INSERT
INTO myTable (...) VALUES (....)

b) create a stored procedure that gets value from a generator, performs an
insert and returns the value to the client.

Hope this helps.

Roman