Index: SQLBlob.java =================================================================== --- SQLBlob.java (revision 180460) +++ SQLBlob.java (working copy) @@ -187,8 +187,15 @@ return TypeId.BLOB_PRECEDENCE; // not really used } - public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException { - ps.setBlob(position,null); + public void setInto(PreparedStatement ps, int position) + throws SQLException, StandardException + { + if (isNull()) { + ps.setBlob(position, null); + return; + } + + ps.setBytes(position, getBytes()); } }