|Subject||Re: returning generated keys|
> I note that a call toYou are right. This method does not works because server does not
> Statement.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS)
> currently raises an exception with a 'not yet implemented'
> message. I imagine this has a lot to do with there being
> no 'autoinc' type in firebird? (yes I'm using a trigger and a
have autoinc datatype.
> Does anyone have a clever and (most importaintly) portable way ofSplit ID generation and statement execution into two separate steps.
> doing the same thing? Although we are currently using Firebird for
> development, ultimatly our clients will be making the call as to
> which database the app will run on so we need to keep it all as
> generic as possible.
You can decide if you want to make these steps visible on the
interface level, or only in the implementation.
Another approach can be creating a stored procedure that performs
insert and returns you generated ID. But in this case you need to use
CallableStatement or PreparedStatement.executeQuery().