From: | Robert Down <down(at)mind(dot)net> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | absolute() error with jdbc7.1-1.2 |
Date: | 2001-11-12 18:53:45 |
Message-ID: | 01111210534508.01222@zen.ashlandagency.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc pgsql-patches |
with the lasttest driver, I can't use absolute() according to the spec.
index = -1;
rs.absolute(index);
What it currently does:
java.lang.ArrayIndexOutOfBoundsException: -2 < 0
What it should do according to the spec:
========================================
public boolean absolute(int row)
throws SQLExceptionMoves the cursor to the given row number
in this ResultSet object.
If the row number is positive, the cursor moves to the given row number with
respect to the beginning of the result set. The first row is row 1, the
second is row 2, and so on.
If the given row number is negative, the cursor moves to an absolute row
position with respect to the end of the result set. For example, calling the
method absolute(-1) positions the cursor on the last row; calling the method
absolute(-2) moves the cursor to the next-to-last row, and so on.
An attempt to position the cursor beyond the first/last row in the result set
leaves the cursor before the first row or after the last row.
===========================================
Please note the important fact that you can use (-1) as a position. This is
very important.
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2001-11-12 19:12:47 | Re: MD5-based passwords |
Previous Message | Barry Lind | 2001-11-12 17:30:45 | Re: SQLException: ERROR: oidin: when loading GIF file |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-11-12 19:19:27 | Re: stupid patch of pg_dumplo |
Previous Message | Bruce Momjian | 2001-11-12 18:01:48 | Re: ALTER TABLE RENAME fix |