什么jdbc驱动程序?是否支持sqlStmt=sqlConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
试试sqlStmt=sqlConn.createStatement();

解决方案 »

  1.   

    成功了!谢谢~!能告诉我sqlConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    括号里面那些东东的意思吗?有与没有有什么区别?
      

  2.   

    Statement stmt = con.createStatement(
                                          ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
           ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
           // rs will be scrollable, will not show changes made by others,
           // and will be updatable

    static int CONCUR_READ_ONLY           
    The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.static int CONCUR_UPDATABLE           
    The constant indicating the concurrency mode for a ResultSet object that may be updated.static int FETCH_FORWARD           
    The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.static intFETCH_REVERSE           
    The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.static intFETCH_UNKNOWN           The constant indicating that the order in which rows in a result set will be processed is unknown.static intTYPE_FORWARD_ONLY           The constant indicating the type for a ResultSet object whose cursor may move only forward.static intTYPE_SCROLL_INSENSITIVE           The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.static intTYPE_SCROLL_SENSITIVE           The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others,你自己慢慢看吧
      

  3.   

    是否支持滚动、更新。建议你使用mysql的Jconnector3.0,这个版本支持jdbc2.0
      

  4.   

    sqlConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    支持回滚!要求JDBC2.0,没有ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY只是简单的Statement!JDBC1.0就可以了 !