Access数据库的字段设置,看看是否是必添字段,是否允许空值等.数字型数据不允许插入空值.可以不插入值.你在仔细看看.建议一般不要用access数据库.

解决方案 »

  1.   

    print the sql then run  sql in access.
      

  2.   

    Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    ===>
    Statement stmt;
    stmt = con.createStatement(
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
            stmt.executeUpdate(sql);
      

  3.   

    ResultSet.CONCUR_READ_ONLY你只读了,还咋写啊?
      

  4.   

    对,Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

    ResultSet.CONCUR_READ_ONLY已经将返回的数据记录集设为只读啦,
    删掉,应该就可以了!