Bidimensional Array

Поиск
Список
Период
Сортировка
От Leandro Guimarães
Тема Bidimensional Array
Дата
Msg-id CAJV35FMHLeieh3zOwzMSvNqnppeEJe4v6fF8diiESVHswQEkzg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bidimensional Array  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Hello Everyone,
  Please, could someone help me with the following problem?

  I need to get a bidimensional array from a postgresql function, everything is working fine with the driver version 8.2 bellow, put when i upgraded to 9.x the .getArray() method is not working anymore, i always have the message: No results were returned by the query.

  Following my code and my exception with the comments, please i'm crazy searching for a answer for this problem:

....

Array arr = rs.getArray(1); //checking the array, i'ts possible to see the elements "{"{319.1,811.2,915.5}"}"
ResultSet arrRS = arr.getResultSet();
while (arrRS.next()) {                    
     Array a1 = arrRS.getArray(2); //checking the array, i'ts possible to see the elements {319.1,811.2,915.5}                                         
     String[] str = (String[]) a1.getArray(); //HERE HAPPENS THE EXCEPTION

}

...

Following the exception

rg.postgresql.util.PSQLException: No results were returned by the query.
    at org.postgresql.jdbc2.TypeInfoCache.getPGArrayElement(TypeInfoCache.java:390)
    at org.postgresql.jdbc2.AbstractJdbc2Array.buildArray(AbstractJdbc2Array.java:323)
    at org.postgresql.jdbc2.AbstractJdbc2Array.getArrayImpl(AbstractJdbc2Array.java:149)
    at org.postgresql.jdbc2.AbstractJdbc2Array.getArray(AbstractJdbc2Array.java:115)


Thanks!
Leandro Guimarães


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Datasource portNumber property
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Bidimensional Array