I am updating the files in Oracle DataBase. using PrepareStatment.setBinaryStream(1, fIS, (int) fBlob.length()); method. But it store only .txt file not storing .pdf or .doc file. Not giving any error giving successfull message but Data Base not Updatating.
please help me to update the .pdf file in database.
the code is as bellow
File fBlob = new File ("test.pdf");
FileInputStream fIS = new FileInputStream(fBlob);
pstUpdate= con.prepareStatement("UPDATE table set file = ? where id = ?");
pstUpdate.setBinaryStream(1, fIS, (int) fBlob.length());
means when i fire that query is showing updating successfully message. but in db it is not updating acctually in database.....
not giving any error.. I think there is any problem with blob data base ?? should i use clob???