pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Gaetano Sferra <gaesferr@libero.it>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: jdbc and refcursor problem
Date: Sun, 05 Dec 2004 20:28:35 -0500
Message-ID: <41B3B5C3.10403@fastcrypt.com> (raw)
In-Reply-To: <I85H5R$B4CD2326C7906242A84B9060C3AF1DBB@libero.it>
References: <I85H5R$B4CD2326C7906242A84B9060C3AF1DBB@libero.it>

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




view thread (2+ messages)

Message-ID: <41B3B5C3.10403@fastcrypt.com>
Permalink:  ../41B3B5C3.10403@fastcrypt.com/
Also on:    postgresql.org/message-id/41B3B5C3.10403@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pg@fastcrypt.com, gaesferr@libero.it
  Subject: Re: jdbc and refcursor problem
  In-Reply-To: <41B3B5C3.10403@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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