ResultSet got NullPointerException on getMetaData calls
От | Gaetano Sferra |
---|---|
Тема | ResultSet got NullPointerException on getMetaData calls |
Дата | |
Msg-id | I8ALFT$189578CB5BD118C282FC0B9D1E04A48E@libero.it обсуждение исходный текст |
Ответы |
Re: ResultSet got NullPointerException on getMetaData calls
|
Список | pgsql-jdbc |
Hello to all, I got a NullPointerException when try to call getMetaData method on a refcursor mapped on a ResultSet. This is an example scenario: create table mytable(name varchar, surname varchar, email varchar); create or replace function myfunction() returns refcursor as' declare rc refcursor; begin open rc for select * from mytable order by surname; return rc; end; This is a piece of code using the above stored function: conn.setAutoCommit(false); CallableStatement proc = conn.prepareCall("{ ? = call myfunction() }"); proc.registerOutParameter(1, Types.OTHER); proc.execute(); ResultSet rs = (ResultSet) proc.getObject(1); ResultSetMetaData rsmd = rs.getMetaData(); // <- NullPointerException I'm using the PostgreSQL 7.4 server and the PostgreSQL JDBC 7.4 drivers. Reading a previous post by Tomas on this ML I've tried to use the PostgreSQL JDBC 8.0 driver without succes, the exception stills here. Thank you for support, Gaetano Sferra ____________________________________________________________ Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega, senza costi di attivazione. Abbonati subito su http://www.libero.it
В списке pgsql-jdbc по дате отправления: