This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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();
Hi, Sri, I am not quite sure how big your image files are. My experience is to save the image names in Oracle and the actual image files separately. Although you can save image files in Oracle DB, you can have problem when an image file is too large. Frank W.