• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in retrieving Excel file from Database

 
Craig Williams
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic