db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Korneliussen <Andreas.Kornelius...@Sun.COM>
Subject Re: Embedded driver support for ResultSet.getRow
Date Fri, 21 Jul 2006 09:45:30 GMT
Matt Frantz wrote:
> I am porting an application from PostgreSQL to Derby.  I use ResultSet.getRow()
> to keep track of whether a particular row has been processed.  However, I get an
> error like this:
> 
> The 'getRow()' method is only allowed on scroll cursors
> 

I could not find anything in JavaDoc for ResultSet.getRow() which 
indicates that getRow() should not be allowed on forward-only result 
sets. So this may be a bug in Derby.

> It seems that even a forward iterator should be able to keep count of the rows,
> so this method should be supported.  Am I mistaken about the semantics of this
> method?  Is there another way to know which row I'm on without using scrolling
> ResultSets, which (according to the docs) read the results into memory?
> 

The docs are out-of-date. I am not sure exactly which version, however 
at least since 10.1.2 scrollable resultsets will back the data to disk 
(to a temporary table) if the result set is huge.

Regards
Andreas

> Regards,
> Matt Frantz
> 
> 


Mime
View raw message