这种字段其实是个blob字段,用流处理.

解决方案 »

  1.   

    其实我困惑的是给image类型的字段赋值,应该用JAVA中什么数据类型,byte[]型好象不行,如果写成
    stmt.executeUpdate("update file_1 set content='"+tent[0]+"' where id=3");
    倒是没有问题的
      

  2.   

    对于这种动态参数的更新语句的执行,用你的这种方法肯定是不行的.PreparedStatement pstmt = con.prepareStatement("update file_1 set content= ? where id=3");
    pstmt.setBinaryStream(1,f, fileLength );
    pstmt.executeUpdate();