setBinaryStream为什么总报错?
hrlin 2005-08-19 10:43:34 写了一段很简单的程序,不知道为什么,setBinaryStream这句总报错,请各位帮忙看看
stmt = conn.prepareStatement("INSERT INTO NULLID.TEST_DB VALUES(3,3,?)");
File imageFile = new File("F:\\temp\\ff.gif");
int fileLength = (int)imageFile.length();
InputStream inputStream = new FileInputStream(imageFile);
stmt.setBinaryStream(1,inputStream,fileLength);
//上面这句报错,这还没往数据库里插入呢,注释掉就没错,究竟哪里写的不对?