"ResultSet.TYPE_SCROLL_INSENSITIVE" in jsp pages.


Web tier: servlets, JSP, Web frameworks: "ResultSet.TYPE_SCROLL_INSENSITIVE" in jsp pages.

  1. Statement stm=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

    when I am declaring statement as above shown. then jsp page showing errors that ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY are undefined variables. how to solve this problems. please send a mail to sngolla at rediffmail dot com.
  2. I know it may sound stupid, but you may wanna check if you have the
    import java.sql.*;

    and then later you can check that the ResultSet you are trying to obtain is scrollable through the following line of code:

      int type = rs.getType();

    The variable type will be one of the following:

      1003 to indicate ResultSet.TYPE_FORWARD_ONLY
      1004 to indicate ResultSet.TYPE_SCROLL_INSENSITIVE
      1005 to indicate ResultSet.TYPE_SCROLL_SENSITIVE

    Hope this helps,
  3. Thank you Mr.Nicky Eshkenazi for your response. In jsp ,

    int test=rs.getType();

    when I am executing the above statement then it is displaying that rs.getType() method is not available in ResultSet interface.

    what will be the problem.

    Thank you.
  4. Hi,

    If you are using JDBC 2.0 u can use Scrollable ResultSet.
    Check which version of JDBC u are using ?