Subject Re: [Firebird-Java] stored procedures and Jaybird
Author Marco Parmeggiani
On Tue, 3 Jun 2003 09:16:32 +0200, you wrote:


>This in the "know bugs" section
>
>
>"3) 631090: Calling stored procedures - cannot be fixed with current
>Firebird implementation."
>
>makes me wonder if stored procedures work or not.. do they work?
>

i don't know what that really mean, what i know is this:

1) call like 'EXECUTE "someProcedure" ... '
you should use CallableStatement in this way:

CallableStatement cs = conn.prepareCall(query);
cs.execute();
rs = cs.getResultSet();

2) call like 'SELECT "bla" FROM "someProcedure"
you should use PreparedStatement in this way:

PreparedStatement ps = conn.prepareCall(query);
rs = ps.executeQuery();

mixing the two things does not work, for example:

PreparedStatement ps = conn.prepareCall(query);
ps.execute();
rs = ps.getResultSet();

won't work. The same for:

CallableStatement cs = conn.prepareCall(query);
rs = cs.executeQuery();


if you follow these rules things work fine.

ciao
--
Seti@Home Java Applets
http://www.mycgiserver.com/~maruko/