Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interbase/Firebird stored proc questions

jschellSomeoneStoleMyAliasAug 31 2002 — edited Mar 19 2004
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2004
Added on Aug 31 2002
7 comments
285 views