Re: Help:updateRow() with CIDR types

From: Moray Taylor <mugen(at)the400(dot)homeunix(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Help:updateRow() with CIDR types
Date: 2004-04-25 00:03:40
Message-ID: 02173BD4-964C-11D8-9535-0003935AA5C0@the400.homeunix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Simon Moses 2004-04-25 05:13:01 loading data into postgresql became slow after i used VACUUME command.
Previous Message Oliver Jowett 2004-04-24 23:43:08 Re: Help:updateRow() with CIDR types