Because you can't navigate ordinally through a forward-only recordset. Find
a JDBC tutorial.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Kowaleski, Michael
Sent: Monday, April 17, 2000 3:22 PM
To: [EMAIL PROTECTED]
Subject: ResultSet first() does not work


i am trying to access the ResultSet first() method, using the default jdbc
driver shipped with java 2 sdk v1.3 (JdbcOdbc.dll version 2.1) and the sun
javaWebServer 2.0.  i keep getting the following error:

java.sql.SQLException: Result set type is TYPE_FORWARD_ONLY

this is an example of what i need to accomplish:

ResultSet xSet = y.executeQuery("");
while (i) {
        ....
        if ( xSet.first( ) ) {
                do {
                        if ( 0 == name.compareTo( xSet.getString( "name" ) )
)
                                color = xSet.getString( "color" );
                } while ( xSet.next( ) );
        }
        ....
}

can somebody provide me with an explaination of why this does not work?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to