请问下,,为什么同样的代码,传blob参数到存储过程就报错呢???
怎么样才能让存储过程也成功呢?? (oracle 9i 数据库)//关键代码
CallableStatement cs = null;
PreparedStatement ps = null; cs = connection.prepareCall("{call addBlob(?)}");
cs.setBinaryStream(1, new ByteArrayInputStream(entity.getBytes()), entity.getSize());//报错,超出大小 ps = prepareStatement("INSERT INTO BLOBTABLE(myBlob) VALUES(?)");
ps.setBinaryStream(1, new ByteArrayInputStream(entity.getBytes()), entity.getSize());//同样的代码,,这个可以存储进去。。
怎么样才能让存储过程也成功呢?? (oracle 9i 数据库)//关键代码
CallableStatement cs = null;
PreparedStatement ps = null; cs = connection.prepareCall("{call addBlob(?)}");
cs.setBinaryStream(1, new ByteArrayInputStream(entity.getBytes()), entity.getSize());//报错,超出大小 ps = prepareStatement("INSERT INTO BLOBTABLE(myBlob) VALUES(?)");
ps.setBinaryStream(1, new ByteArrayInputStream(entity.getBytes()), entity.getSize());//同样的代码,,这个可以存储进去。。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货