posted 18 years ago
Hi,
I am using Oracle 9i as my DB Server.
I need to read the contents of a binary file (PDF) and store it into a
table within a column of type BLOB. So I am taking the contents of the
file into a FileInputStream object, opening a connection to the DB (and
the connection is getting established), using prepareStatement and then
setting the FileInputStream object using the setBinaryStream method. No
problem till here, but when I execute the (insert) statement with the
executeUpdate (or execute) command, this comes up:
java.sql.SQLException: Io exception: Connection reset
at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
.......
I should mention that the data is getting inserted into the table. But, as evident, this isnt a clean execution. I tried to close the connection and the fileInputStream method but this exception is thrown before that. Infact, nothing is executed after the executeUpdate command.
Here is the relevant code, if it may be of help:
I will appreciate if someone is able to help me with this. I am stuck
on this since 2 days. I hope to get some help here.
Thank you,