Re: jdbc and refcursor problem

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: jdbc and refcursor problem
Дата
Msg-id 41B3B5C3.10403@fastcrypt.com
обсуждение исходный текст
Ответ на jdbc and refcursor problem  ("Gaetano Sferra" <gaesferr@libero.it>)
Ответы Re: PL/JAVA
Список 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



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PL/Python: How do I use result methods?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: [HACKERS] PL/Python: How do I use result methods?