strSQL = "select * from student;"; +++++++++++++++++++++++++++
student;"; 
!!!!!!

解决方案 »

  1.   

    strSQL = "select * from student;"; +++++++++++++++++++++++++++
    student;"; 
    !!!!!!
    支持
      

  2.   

    你叫我们“大哥”,我叫你“老大”好了。我算服了你了。student;  => “student” 后面有个“;”!——出错信息里已明确告诉你了!
      

  3.   

    SQL语句错!
    select * from student
      

  4.   

    我数据库中的表是小写的student表
    而报错是关于大写的STUDENT在数据库中,我将student改成STUDENT后,仍然报错,但是错误信息变成了???student???也就是说是sqlserver的问题是不是这句话Statement  stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet
    .CONCUR_UPDATABLE);用错了这里的两个参数是什么意思啊?
    那位碰到过这种情况的,冒个泡啊
      

  5.   


    错误为:
    ------------------------------
    type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver][SQL Server]??? 'STUDENT' ???
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
    org.apache.jsp.fyxs_jsp._jspService(fyxs_jsp.java:191)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]??? 'STUDENT' ???
    sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
    sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount(JdbcOdbcResultSet.java:6209)
    sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:150)
    sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:424)
    sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:254)
    org.apache.jsp.fyxs_jsp._jspService(fyxs_jsp.java:85)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Tomcat logs.
      

  6.   

    关键不是这个问题。把这些代码防在也面中实在不好啊。如果有好几是个也面要分页就比较恼火啊。拷贝起来容易出问题。而且代码和也面藕荷得太严重。你去查查分页bean的知识好不好。顺便看看MVC。我这里也有个分页的bean和也面调用的方法。要的话给我发邮件
    [email protected]
      

  7.   

    还可以看看strSQL = "select * from student;"; 是不是因为里面多加了分号
    改成strSQL = "select * from student"; 看看。
      

  8.   

    gks_cn(981530)
    我发了一封邮件给你了,发个分页的bean和也面调用的方法给我吧
    谢谢!
      

  9.   

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");  
    Connection  conn=  DriverManager.getConnection("jdbc:odbc:actonline");  
    这段代码是否需要用到sql的jdbc:odbc包?
      

  10.   

    //获取记录总数 
    rs.last(); 
    intRowCount = rs.getRow(); 改成:
    //获取记录总数
    rs.absolute(-1);
    intRowCount = rs.getRow();
      

  11.   

    strSQL = "select * from student;"; 
    这个改了以后是没有问题的确定你的数据源
    ("jdbc:odbc:actonline");  
    是否正确