pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedjdbc and refcursor problem
2+ messages / 2 participants
[nested] [flat]
* jdbc and refcursor problem
@ 2004-12-03 14:20 Gaetano Sferra <gaesferr@libero.it>
2004-12-06 01:28 ` Re: jdbc and refcursor problem Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 2+ messages in thread
From: Gaetano Sferra @ 2004-12-03 14:20 UTC (permalink / raw)
To: pgsql-interfaces
Hello to all,
I need to process a cursor returned by a stored function,
reading the jdbc driver docs I learned how to do it but I got a strange behavior
using metadata.
For xample:
CallableStatement cstm = conn.prepareCall("{ ? = call myfunction() }");
cstm.registerOutParameter(1, Types.OTHER);
cstm.execute();
ResultSet rs = (ResultSet) cstm.getObject(1);
ResutlSetMetaData rsmd = rs.getMetaData();
int columns = rsmd.getColumnCount() // <-- this throw a NullPointerException
I got a NullPointerException when try to retrieve the ResultSet column count
even if the ResultSet contains or not data. Is there a workaround?
Thanks,
Gaetano Sferra
____________________________________________________________
Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega, senza costi di attivazione.
Abbonati subito su http://www.libero.it
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: jdbc and refcursor problem
2004-12-03 14:20 jdbc and refcursor problem Gaetano Sferra <gaesferr@libero.it>
@ 2004-12-06 01:28 ` Dave Cramer <pg@fastcrypt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2004-12-06 01:28 UTC (permalink / raw)
To: Gaetano Sferra <gaesferr@libero.it>; +Cc: pgsql-interfaces
Gaetano,
Try posting this to the jdbc list
pgsql-jdbc@postgresql.org
Dave
Gaetano Sferra wrote:
>Hello to all,
>I need to process a cursor returned by a stored function,
>reading the jdbc driver docs I learned how to do it but I got a strange behavior
>using metadata.
>For xample:
>
>CallableStatement cstm = conn.prepareCall("{ ? = call myfunction() }");
>cstm.registerOutParameter(1, Types.OTHER);
>cstm.execute();
>
>ResultSet rs = (ResultSet) cstm.getObject(1);
>ResutlSetMetaData rsmd = rs.getMetaData();
>int columns = rsmd.getColumnCount() // <-- this throw a NullPointerException
>
>I got a NullPointerException when try to retrieve the ResultSet column count
>even if the ResultSet contains or not data. Is there a workaround?
>
>Thanks,
>Gaetano Sferra
>
>
>
>____________________________________________________________
>Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega, senza costi di attivazione.
>Abbonati subito su http://www.libero.it
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
>
>
--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-12-06 01:28 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-03 14:20 jdbc and refcursor problem Gaetano Sferra <gaesferr@libero.it>
2004-12-06 01:28 ` Dave Cramer <pg@fastcrypt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox