Skip site navigation (1) Skip section navigation (2)

Re: jdbc and refcursor problem

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

Try posting this to the jdbc list



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);
>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?
>Gaetano Sferra
>Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega, senza costi di attivazione.
>Abbonati subito su
>---------------------------(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
519 939 0336

In response to


  • Re: PL/JAVA at 2004-12-06 06:49:53 from Jaime Casanova

pgsql-interfaces by date

Next:From: Michael FuhrDate: 2004-12-06 05:40:03
Subject: Re: [HACKERS] PL/Python: How do I use result methods?
Previous:From: Tom LaneDate: 2004-12-05 20:15:33
Subject: Re: [HACKERS] PL/Python: How do I use result methods?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group