Subject | Re: stored procedures and Jaybird |
---|---|
Author | d115751 |
Post date | 2003-06-04T16:55:31Z |
No, there IS a problem with stored procedures in Jaybird when you
execute stored procedure that returns multiple rows.
In this case you should use this query :
SELECT * FROM "procedure name";
It works fine.
--- In Firebird-Java@yahoogroups.com, Marco Parmeggiani
<marcopar@i...> wrote:
execute stored procedure that returns multiple rows.
In this case you should use this query :
SELECT * FROM "procedure name";
It works fine.
--- In Firebird-Java@yahoogroups.com, Marco Parmeggiani
<marcopar@i...> wrote:
> On Tue, 3 Jun 2003 09:16:32 +0200, you wrote:current
>
>
> >This in the "know bugs" section
> >
> >
> >"3) 631090: Calling stored procedures - cannot be fixed with
> >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/