Re: ResultSet with more than 5 rows causes error - Mailing list pgsql-jdbc

From Giuseppe Sacco
Subject Re: ResultSet with more than 5 rows causes error
Date
Msg-id 1190910427.18730.35.camel@scarafaggio
Whole thread Raw
In response to ResultSet with more than 5 rows causes error  (Ludovico Bianchini <metlud@yahoo.it>)
List pgsql-jdbc
Il giorno gio, 27/09/2007 alle 12.20 +0200, Ludovico Bianchini ha
scritto:
[...]
> while(source.next()) {
> insertCall.registerOutParameter(1, Types.INTEGER);
> for (int i = 1; i <= colCount; i++) {
> data = source.getObject(i);
> insertCall.setObject(i+1, data);
> }
> insertCall.execute();
[...]

I never used CallableStatement, but I do think you should use
    insertCall.setObject(i,data)
instead of
    insertCall.setObject(i+1,data)



pgsql-jdbc by date:

Previous
From: "Ludovico Bianchini"
Date:
Subject: Re: ResultSet with more than 5 rows causes error
Next
From: Giuseppe Sacco
Date:
Subject: Re: ResultSet with more than 5 rows causes error