I have several questions about Interbase/Firebird and the use of stored procedures with JDBC. I am using the FirebirdSQL driver but answers using other drivers (as noted) might be useful as well.
1. Is there any way to call a stored procedure which returns a result set using CallableStatement? If so what does the jdbc string look like and what does the return part of the stored proc look like (presumably do-suspend.)
2. Is there any way to call a stored procedure which returns a value using using CallableStatement? This would be where registerOutParameter() would be used. If so what does the jdbc string look like and what does the stored proc look like?
3. Is there an 'identity' keyword? This would return the value of the last GEN_ID() call.
4. I need to return a unique sequence from a stored proc. I am using the following syntax.
for select tid from Telephone_Type
where tid = :new_tid
into new_tid
do SUSPEND;
Is there a simpler way to do this? The value is obviously already in new_tid, I just need some way to return it.