... - Mailing list pgsql-jdbc

From News Subsystem
Subject ...
Date
Msg-id 201302201401.r1KE1N0A011068@news.hub.org
Whole thread Raw
Responses Re:
List pgsql-jdbc
Wed, 20 Feb 2013 06:01:21 -0800 (PST)Wed, 20 Feb 2013 06:01:21 -0800 (PST)
X-Newsgroups: pgsql.interfaces.jdbc
Date: Wed, 20 Feb 2013 06:01:21 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com;
posting-host=174.115.190.53;posting-account=hKFGKAkAAAB4U5rGhRuB_p6PSIbpGEph
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <633775d5-77ad-4f49-bf2e-3d5868e26e04@googlegroups.com>
Subject: question about PG JDBC expects results of procedures to be consumed
From: thesix campbells <the6campbells@gmail.com>
Injection-Date: Wed, 20 Feb 2013 14:01:21 +0000
Content-Type: text/plain; charset=ISO-8859-1
To: pgsql-jdbc@postgresql.org

Can someone clarify why the PG/JDBC driver will not support this style of JDBC methods to consume result sets and
insteadrequires the 2nd form. I see examples of how (re 2nd) but not necessarily explanation re why other approaches
maynot be supported.
 

org.postgresql.util.PSQLException: Bad value for type int : <unnamed portal 1>

String sproc = "{call pres()}";
CallableStatement cs = conn.prepareCall(sproc);
boolean hasResults = cs.execute();
while (hasResults) {rs = cs.getResultSet();while (rs.next()) {    ....}rs.close();hasResults = cs.getMoreResults();
}
cs.close();


String sproc = "{? = call pres()}";
CallableStatement cs = conn.prepareCall(sproc);
cs.registerOutParameter(1, Types.OTHER);
cs.execute();



pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC - PreparedStatement reuse oddity when using setObject() with nulls and setTimestamp()
Next
From: Alastair Burr
Date:
Subject: Re: JDBC - PreparedStatement reuse oddity when using setObject() with nulls and setTimestamp()