>From: "Papaya Head" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: How to test if the ResultSet is empty
>Date: Thu, 08 Jun 2000 18:12:46 CDT
>Mime-Version: 1.0
>Content-Type: text/plain; format=flowed
>
>sounds like the JDBC driver you got only implemements a subset of the
>JDBC2.0 standard. maybe you can search into IBM web site and try to find a
>better version...
>
>besides using a flag, you can also try an if statement followed by a
>do-while loop.
>
>if (rs == null || rs.next()) {
>}
>
>do {
>   ...
>} while (rs != null && rs.next());
>
> >From: "Kao, Shirley (Exchange)" <[EMAIL PROTECTED]>
> >
> >I found that although I have created Statement with:
> >
> >Statement stmnt =
> >con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ON
> >LY);
> >
> >the exception still thrown:
> >java.sql.SQLException: Scroll sensitive result set is not supported by
>this
> >version of the DB2 JDBC 2.0 driver.
> >
> >I suspect it is not a true JDBC2.0 driver.
> >
> >I kind managed to test for empty result set by using a boolean flag
>inside
> >the WHILE loop, example:
> >
> >                         while (rs.next()) {
> >                                 for (int i = 1; i <= colCnt; i++) {
> >                                         if (!hasRows) hasRows = true;
> >                                         System.out.print(" " +
> >rs.getString(i));
> >                                    }   System.out.println("");
> >                         }
> >         The test for null didn't work for me:
> >         >        if(aResultSet == null) {
> >         >           ...
> >         >         }
> >
> >          > Servlet request terminated with Error:
> >          > java.lang.AbstractMethodError: getBigDecimal
> >         >>I suspect you didn't put the driver in the classpath that your
> >servlet
> >         engine knows about...
> >
> >         I believe I do have the db2java.zip in my classpath, otherwise,
>I
> >will get exceptions before the resultset created, e.g. connection or
>driver
> >fail, or something... Isn't it?
> >
> >         Thank you.  I am much obliged to all your suggestions.
> >
> >         Shirley Kao.
> >         (work) 973-793-5502 (fax) 973-793-5471
> >         email: [EMAIL PROTECTED]
> >

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

___________________________________________________________________________
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