aspose file tools
The moose likes JDBC and the fly likes How to upload a file to a database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How to upload a file to a database " Watch "How to upload a file to a database " New topic
Author

How to upload a file to a database

visu Nekk
Ranch Hand

Joined: Sep 06, 2005
Posts: 122
Can anyone guide me how to store a file in the database and retrive it in text format.
[ September 06, 2005: Message edited by: visu Nekk ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

What is the problem? Compressing, writing to Access or getting it back out?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35247
    
    7
If you want to store data in a compressed format, whatever you retrieve will also be in compressed format, so you'll need to do the compressing/uncompressing yourself. The datatype to use would probably be a BLOB, which requires a JDBC 3.x driver. If I remember correctly, the Sun JDOC/ODBC bridge only supports a subset of JDBC 3, so you may need to find a better driver. (And I have no idea if Access even supports BLOBs).

On an unrelated note, next time you should ask a question like this in the JDBC forum, as it has nothing to do with servlets (and I won't even go into how servlets provide a multi-threaded environment in which Access and the JDBC/ODBC bridge can cause all kinds of problems).
[ September 06, 2005: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Nice point, nothing to do with Servlets.
This thread has been moved to the JDBC forum.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to upload a file to a database
 
Similar Threads
visitor counter
How to calculate the hit count
JDBC
how to save files into oracle database using java as a object.
JDBC