这样试试,如果还不行,那就是你的JDBC版本不支持这种方法了。
strm2 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE) ;
rs1=strm2.executeQuery(sql_str) ;

解决方案 »

  1.   

    还是不行啊,感觉不应该是jdbc的问题!!
    因为我自己机器上是可以的啊,而且上传的第一天显示是很正常的,第二天就变了!
    郁闷~~~~~~~~~~~
    up
      

  2.   

    大家看看啊,我的页面http://ecsu.3322.org/mode1/index.jsp index.jsp的代码: 
    <%@ page language="java" import="java.sql.*"%> 
    <%@ page contentType="text/html;charset=gb2312"%> 
    <jsp:useBean id="DB" scope="page" class="bbs.Mysql" /> 
    <% 
    //以下三行清除缓存,每次进入该页面自动刷新 
    response.setHeader("progma","no-cache"); 
    response.setHeader("Cache-Control","no-cache"); 
    response.setDateHeader("Expires",0); 
    int pagesize; //每页记录数 
    int rowcount; //总记录数 
    int pagecount; //总页数 
    int pages; //当前页码 
    String strpage; //传递参数变量 
    String sql=""; //查询语句 
    String title=""; 
    pagesize=20; 
    rowcount=0; //初始化 
    strpage=request.getParameter("page"); 
    if(strpage==null){ 
    pages=1; 
    }else{ 
    pages=java.lang.Integer.parseInt(strpage); 
    if (pages<1) pages=1; 

    sql="select count(*) as count from forum where rootid=0"; 
    ResultSet rs=DB.executeQuery(sql); 
    if (rs.next()){ 
    rowcount=rs.getInt("count"); //得到总主贴数 

    pagecount=(rowcount+pagesize-1)/pagesize; //计算总页数 
    if (pages>pagecount){ 
    pages=pagecount; 
    rs.close(); 
    } //对于大于总页数的页面调整为最大页数 
    %> 
    <html> 
    <head> 
    <title>欢迎来到在线学习论坛</title> 
    </head> 
    <body background="image/bbg.gif"> 
    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#000000"> 
    <tr> 
    <td bgcolor="#0099ff" height="16"> <font color="#FFFFFF">在线学习论坛 <a href="login.html"><font color="#FFFFFF">登录</font></a> 
    <a href="reg.html"><font color="#FFFFFF">注册</font></a> <a href="loginout.jsp"><font color="#FFFFFF">注销</font></a></font></td> 
    </tr> 
    </table> 
    <p> </p> 
    <table width="25%" border="0" align="right"> 
    <tr> 
    <td><font color="#0000FF"><a href="addtitle.jsp">发表新贴</a></font></td> 
    </tr> 
    </table> 
    <form name="form1" method="post" action="search.jsp"> 
    按 
    <select name="select" size="1"> 
    <option value="writer" selected>作者 
    <option value="title">主题 
    </select> 
    <input type="text" name="text"> 
    <input type="submit" name="Submit" value="搜索"> 
    </form> 
    <table width="100%" border="0"> 
    <tr bgcolor="#0099ff"> 
    <td align=center width=10% height="34"><font color="#FFFFFF"><b>编号</b></font></td> 
    <td align=center width=46% height="34"><font color="#FFFFFF"><b>讨论区</b></font></td> 
    <td align=center width="12%" height="34"><font color="#FFFFFF"><b>发言人</b></font></td> 
    <td align=center width="12%" height="34"><font color="#FFFFFF"><b>回复数</b></font></td> 
    <td align=center width="20%" height="34"><font color="#FFFFFF"><b>最后更新时间</b></font></td> 
    </tr> 
    <% 
    sql="select * from forum where rootid=0 order by lastupdatetime DESC"; 
    ResultSet rs1=DB.executeQuery(sql); //得到主贴记录集 
    //显示记录 
    if(rowcount>0){ 
    rs1.absolute((pages-1)*pagesize+1); 
    int i=0; 
    while ((i<pagesize)&&(!rs1.isAfterLast())){ 
    title=rs1.getString("title"); 
    if (title.length()>50) { 
    title=title.substring(0,49)+"...";} 
    %> 
    <tr> 
    <td align=center width=10% height="34"><font color="#000063"><%=rs1.getInt("id")%></font></td> 
    <td align=left width=46% height="34"><font color="#0099ff"><a href=forumcontent.jsp?id=<%=rs1.getInt("id")%>><%=title%></a></font></td> 
    <td align=center width="12%" height="34"><font color="#000063"><%=rs1.getString("writer")%></font></td> 
    <td align=center width="12%" height="34"><font color="#000063"><%=rs1.getInt("replynum")%></font></td> 
    <td align=center width="20%" height="34"><font color="#000063"><%=rs1.getString("lastupdatetime")%></font></td> 
    </tr> 
    <% 
    rs1.next(); 
    i++; 


    %> 
    </table> 
    <hr color="#0099ff"> 
    </body> 
    </html> 
    <% 
    rs1.close(); 
    %> 
      

  3.   

    可能是cache的问题,把work目录删除掉,然后重新启动服务器看看