|
|
 | | From: | Gaetano Sferra | | Subject: | jdbc and refcursor problem | | Date: | Fri, 3 Dec 2004 15:20:15 +0100 |
|
|
 | 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)
|
|
 | | From: | Dave Cramer | | Subject: | Re: jdbc and refcursor problem | | Date: | Sun, 05 Dec 2004 20:28:35 -0500 |
|
|
 | 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
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
|
|
 | | From: | Jaime Casanova | | Subject: | Re: PL/JAVA | | Date: | Mon, 6 Dec 2004 00:49:53 -0600 (CST) |
|
|
 | Hi,
just a quetion. i read about pl/java about 3 months ago so, will be pl/java in 8.0?
regards, Jaime Casanova
_________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
|
|
 | | From: | Dave Cramer | | Subject: | Re: PL/JAVA | | Date: | Mon, 06 Dec 2004 07:51:48 -0500 |
|
|
 | PL/JAVA and pl-j are both interfaces and will work with 8.0 but not be bundled in
for pl-j see http://plj.codehaus.org/
Dave Jaime Casanova wrote:
>Hi, > >just a quetion. i read about pl/java about 3 months >ago so, will be pl/java in 8.0? > >regards, >Jaime Casanova > >_________________________________________________________ >Do You Yahoo!? >Información de Estados Unidos y América Latina, en Yahoo! Noticias. >Visítanos en http://noticias.espanol.yahoo.com > >---------------------------(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
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
|
|
|