Hi We have a requirement to store files into database and later we need to retrieve it.We need to store Excel files with contents.We have a column of type of Blob in Oracle Database 9.X.we have used OraclePreparedStatement,BLOB of oracle implementation to store the excel file content into database.the data gets stored in the database.We have used Oracle implementation of BLOB and OracleResultSet to retrieve the data from that BLOB column.After retrieving and converting into physical file ,when i tried to open the excel file,i get a popup "Unable to Read" and file gets opened,but i cud not able to find any contents in the excel file. Please tell a suitable way to handle this type of issues.
How are you opening the file? Directly from the database, or downloaded and saved as a individual file? Without an Excel file extension name, the content/page type must be set if the file is read directly from the database else the browser won't know how to read it.
Other than that, your problem sounds like it could be programatic. Oracle doesn't usually corrupt files it stores as Blobs. Perhaps if you post some code as to how you are storing/retreiving the file.
Check which version of the Oracle JDBC drivers you are using. There were some problems with the 9i drivers for BLOBs and CLOBs. Problem goes away when you switch to the 10g drivers. Doesn't mean you have to change database versions, just talking about the JDBC driver libraries.