Subject Use generators instead of a next ID table.
Author Jonas Olofsson
Hi,

I am currently working on a Java application that uses a Interbase6
database via Firebird 2.0. Legacy applications in Delphi are still
using the same database via Interbase

The old applications used a table for getting the next id for other
tables i.e

SELECT ID FROM NEXTIDS WHERE TABLENAME = 'xyz'
UPDATE NEXTIDS SET ID = ID+1 WHERE TABLENAME = 'xyz'


TABLE NEXTIDS(
ID Integer NOT NULL,
TABLENAME Varchar(31) CHARACTER SET NONE NOT NULL,
ROW_FLAG Integer DEFAULT 0 NOT NULL
)

Is it somehow possible for me to use generators for the new
application but still keep the nextids table up-to-date. This so
legacy applications still can use the same database without need to
change any code?