Subject RE: [Firebird-Java] Update WHERE CURRENT OF vs. ResultSet.isLast()
Author Robert DiFalco
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.