Subject RE: [Firebird-Java] Update WHERE CURRENT OF vs. ResultSet.isLast()
Author Marco Ferretti
Same as Robert.
In addition I have used a lot of positioned updates in the past (for
concurrency work to be handled server side) and this would help me a lot to
migrate to Firebird

-------Original Message-------

From: Firebird-Java@yahoogroups.com
Date: luned� 7 luglio 2003 23.31.14
To: Firebird-Java@yahoogroups.com
Subject: RE: [Firebird-Java] Update WHERE CURRENT OF vs. ResultSet.isLast()

I never use #isLast.

R.

-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Monday, July 07, 2003 2:13 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Update WHERE CURRENT OF vs. ResultSet.isLast()


Hi All,

I've got a request about implementing Statement.setCursorName(String)
and using positioned updates. While implementing this stuff I
discovered that with positioned updates we cannot have
ResultSet.isLast() working.

Reason for this is that server does not tell us anything whether we
fetched the last record or not. This happens only during additional
fetch() (we get reply "sorry, no more records"). Till now we
prefetched one record, but this moves cursor position too. So, when
using positioned update we would update next records, not current.
Fixing this prefetching breaks ResultSet.isLast().

Usually people use while(rs.next()) {...} construct, so broken
rs.isLast() would not affect them. However if you use do {rs.next()}
while(!rs.isLast()), you will get endless loop.

So, the question now is: what do you prefer - positioned updates or
correct work of ResultSet.isLast()? Should I create a poll in the group?

Best regards,
Roman Rokytskyy


Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Yahoo! Groups Sponsor
ADVERTISEMENT




To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


__________ NOD32 1.439 (20030616) Information __________

This message was checked by NOD32 Antivirus System.
http://www.nod32.com