Re: Help:updateRow() with CIDR types

Поиск
Список
Период
Сортировка
От Moray Taylor
Тема Re: Help:updateRow() with CIDR types
Дата
Msg-id 02173BD4-964C-11D8-9535-0003935AA5C0@the400.homeunix.com
обсуждение исходный текст
Ответ на Re: Help:updateRow() with CIDR types  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc

On 25 Apr 2004, at 00:43, Oliver Jowett wrote:


<excerpt>Moray Taylor wrote:

<excerpt>Does this mean the absolute() method will not work on any
ResultSet  that I get from a query?

absolute() row access is totally critical to my application, will I
need to stick with 7.5 build 301?

</excerpt>

If you want to use absolute() (or relative(), first(), last(),
prev()), you must specify TYPE_SCROLLABLE_xxx when creating the
statement, per the spec. The default is TYPE_FORWARD_ONLY, which as
the name implies creates resultsets that can only be iterated through
forwards using next(). See the ResultSet javadoc for details:


  http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html


-O


</excerpt>

I use this code,


<fixed>stmt =
DBConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);</fixed>


but still get this error


ERROR:Operation requires a scrollable resultset, but this resultset is
FORWARD_ONLY.

org.postgresql.util.PSQLException: Operation requires a scrollable
resultset, but this resultset is FORWARD_ONLY.



do I need to specify anything else in the statment?


Thanks v much


Moray

On 25 Apr 2004, at 00:43, Oliver Jowett wrote:

> Moray Taylor wrote:
>> Does this mean the absolute() method will not work on any ResultSet
>> that I get from a query?
>> absolute() row access is totally critical to my application, will I
>> need to stick with 7.5 build 301?
>
> If you want to use absolute() (or relative(), first(), last(),
> prev()), you must specify TYPE_SCROLLABLE_xxx when creating the
> statement, per the spec. The default is TYPE_FORWARD_ONLY, which as
> the name implies creates resultsets that can only be iterated through
> forwards using next(). See the ResultSet javadoc for details:
>
>   http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html
>
> -O
>

I use this code,

stmt =
DBConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet
.CONCUR_UPDATABLE);

but still get this error

ERROR:Operation requires a scrollable resultset, but this resultset is
FORWARD_ONLY.
org.postgresql.util.PSQLException: Operation requires a scrollable
resultset, but this resultset is FORWARD_ONLY.


do I need to specify anything else in the statment?

Thanks v much

Moray

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Help:updateRow() with CIDR types
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: patch: streaming of bytea parameter values