db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Kruschitz <krusch...@grid-it.at>
Subject Problem with ResultSet
Date Thu, 13 Aug 2009 15:39:51 GMT
Hi list,

I am trying to embed a Derby database in a desktop application. When I 
run a query and then try to use the isBeforeFirst() method on the 
ResultSet I get back, I get following exception:

java.sql.SQLException: The 'isBeforeFirst' method is only allowed on 
scroll cursors.
         at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
         at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown 
Source)
Caused: java.sql.SQLException: The 'isBeforeFirst' method is only 
allowed on scroll cursors.
         at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
Source)
         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown 
Source)
         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown 
Source)
         at 
org.apache.derby.impl.jdbc.EmbedResultSet.checkScrollCursor(Unknown Source)
         at 
org.apache.derby.impl.jdbc.EmbedResultSet.checkRowPosition(Unknown Source)
         at 
org.apache.derby.impl.jdbc.EmbedResultSet.isBeforeFirst(Unknown Source)
         at at.grid.cms.user.CmsGroup.create(CmsGroup.java:67)

What does "The 'isBeforeFirst' method is only allowed on scroll 
cursors." exactly mean? Is that handled by the JDBC driver? (I'm using 
java.sql.ResultSet in my class)

I'm actually porting the application from PostgreSQL and it makes 
extensive use of the isBeforeFirst() method. I haven't really found a 
workaround yet, any ideas?

Am I missing something here?

Thanks a lot for your help!

Phil


Mime
View raw message