The error you're getting means that your driver doesn't support the
ResultSet.first() method.  Most Java JDBC drivers were not Java JDBC API 1.2
compatible until just recently.  It's only then that Java truely supported
scrollable result sets that could jump around rather then just going to the
next record.  I would bet you that any ResultSet movement methods other than
next() probably wouldn't work.  This is pretty unfortunate because scrollable
result sets are a great time saver and allow a lot of flexibility that you had
to code yourself before.

Look for an update for your driver or get another one.  You can look on Sun's
Java website at http://java.sun.com/products/jdbc/ for drivers that match
whatever database you are using with the abilities you would like to have.
Most of these are a little expensive but there are a few free ones.  I don't
know that Sun has any intention of updating their driver since in their own API
they list it as a reference driver strictly for testing and not recommended to
be used in non-production environments.

If you are using MySQL, which is a pretty popular database for small
developers, I know that both the TWZ and MM.MySQL drivers now support JDBC 1.2
and scrollable result sets.

Matt Penner

Quoting "Jonathan Silvergran, SM3OJR" <[EMAIL PROTECTED]>:

> I'm trying to use this in a servlet running on a Java Web Server (with
> the latest patches etc):
>
> if ( !resultset.first() ) {
>   do something...
> }
>
> ... and the server returns an error 500:
> exception: java.sql.ResultSet: method first()Z not found.
>
> The strange part is that  resultset.next()  works OK.
> And where does the "Z" after first() come from?
>
> /Jon
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to