jdbc and refcursor problem

Lists: pgsql-interfaces
From: "Gaetano Sferra" <gaesferr(at)libero(dot)it>
To: "pgsql-interfaces" <pgsql-interfaces(at)postgresql(dot)org>
Subject: jdbc and refcursor problem
Date: 2004-12-03 14:20:15
Message-ID: I85H5R$B4CD2326C7906242A84B9060C3AF1DBB@libero.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Gaetano Sferra <gaesferr(at)libero(dot)it>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: jdbc and refcursor problem
Date: 2004-12-06 01:28:35
Message-ID: 41B3B5C3.10403@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Gaetano,

Try posting this to the jdbc list

pgsql-jdbc(at)postgresql(dot)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(at)postgresql(dot)org)
>
>
>
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561


From: Jaime Casanova <systemguards(at)yahoo(dot)com>
To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: PL/JAVA
Date: 2004-12-06 06:49:53
Message-ID: 20041206064953.38882.qmail@web50010.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

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


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Jaime Casanova <systemguards(at)yahoo(dot)com>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: PL/JAVA
Date: 2004-12-06 12:51:48
Message-ID: 41B455E4.6040903@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

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(at)postgresql(dot)org)
>
>
>
>

--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561