Subject | RE: [Firebird-Java] CallableStatement returning a ResultSet! |
---|---|
Author | Rick DeBay |
Post date | 2004-12-03T15:09:41Z |
Was setSelectableProcedure() required?
It shouldn't be, as that isn't part of the java.sql.CallableStatement
interface.
-----Original Message-----
From: Hulea Mihai [mailto:mihai_hl@...]
Sent: Friday, December 03, 2004 9:54 AM
To: Firebird-Java@yahoogroups.com
Subject: RE: [Firebird-Java] CallableStatement returning a ResultSet!
Hi ,
I have resolved the problem. I updated the jdbc
jaybird driver from 1.5.0 to 1.5.4 and also added the
following line before executing the statement:
((FirebirdCallableStatement)cs).setSelectableProcedure(true);
--- Rick DeBay <rdebay@...> wrote:
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
Yahoo! Groups Links
It shouldn't be, as that isn't part of the java.sql.CallableStatement
interface.
-----Original Message-----
From: Hulea Mihai [mailto:mihai_hl@...]
Sent: Friday, December 03, 2004 9:54 AM
To: Firebird-Java@yahoogroups.com
Subject: RE: [Firebird-Java] CallableStatement returning a ResultSet!
Hi ,
I have resolved the problem. I updated the jdbc
jaybird driver from 1.5.0 to 1.5.4 and also added the
following line before executing the statement:
((FirebirdCallableStatement)cs).setSelectableProcedure(true);
--- Rick DeBay <rdebay@...> wrote:
> Can you post your stored procedure?__________________________________
>
> -----Original Message-----
> From: MIHAI_HL [mailto:mihai_hl@...]
> Sent: Friday, December 03, 2004 4:10 AM
> To: Firebird-Java@yahoogroups.com
> Subject: [Firebird-Java] CallableStatement returning
> a ResultSet!
>
>
>
>
> Hello,
>
> I have a problem when I am executing a stored
> procedure which return a
> ResultSet.
>
> My code looks like this:
>
> CallableStatement cs = conn.prepareCall("EXECUTE
> PROCEDURE
> TEST_RS_RETURN()");
> ResultSet rsc = cs.executeQuery();
> while(rsc.next()){
> System.err.println(rsc.getString(1));
> }
>
> The procedure must return a result set containing 3
> records. But the
> returning result set containts only one record. Can
> you please tell me
> if is something wrong with my code? or what is the
> reason the
> ResultSet object containts only one record.
>
> Also I have tried the following code:
>
> CallableStatement cs = conn.prepareCall("?=EXECUTE
> PROCEDURE
> TEST_RS_RETURN()");
> cs.registerOutParameter(1, Types.OTHER);
> cs.execute();
> ResultSet rsc = (ResultSet)cs.getObject(1);
> ...
>
> but the following exception is thrown :
> org.firebirdsql.jdbc.field.TypeConvertionException:
> Error converting
> to object.
>
> Thanks
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
Yahoo! Groups Links