posted 24 years ago
I am getting problem when I try to store large image files
into blob column. I am getting ORA-01461: can bind a LONG value only for insert into a LONG column when I tried to insert
large image files. It works fine for small image files. The code
is as follows;
PreparedStatement stmnt = conn.prepareStatement(
"insert into tempfile (name,file_blob) values (?,?)");
stmnt.setString(1,"temp");
stmnt.setBinaryStream(2, new FileInputStream(file), (int) file.length());
stmnt.execute();
stmnt.close();