| From: | Andy Colson <andy(at)squeakycode(dot)net> |
|---|---|
| To: | S Arvind <arvindwill(at)gmail(dot)com> |
| Subject: | Re: ResultSet is FORWARD_ONLY. |
| Date: | 2009-06-16 18:26:25 |
| Message-ID: | 4A37E3D1.60205@squeakycode.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
S Arvind wrote:
> Hi everyone,
> Recently we have upgraded postgres driver jdbc4 for 8.3. After that
> while executing rst.first(), it raise the exception.
> The statment was created correctly as
> dbconnection..createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
>
> org.postgresql.util.PSQLException: Operation requires a scrollable
> ResultSet, but this ResultSet is FORWARD_ONLY.
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkScrollable(AbstractJdbc2ResultSet.java:207)
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.first(AbstractJdbc2ResultSet.java:292)
> at
> org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.first(DelegatingResultSet.java:326)
>
>
> This statment worked in postgres 8.1 jdbc 3 driver but now its not..
> Pleas help is solving this...
>
> -Arvind S
I guess there are two important questions:
1) do you want a forward only result set?
2) if yes, then cant you just remove .first()?
Its ok not to use first, right:
q.open();
while (! q.eof())
{
do something;
q.next();
}
(IANAJP)
-Andy
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Just Someone | 2009-06-16 18:30:49 | Re: Amazon EC2 | Any recent developments |
| Previous Message | Greg Smith | 2009-06-16 18:05:33 | Re: Amazon EC2 | Any recent developments |