• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to upload a file to a database

 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the problem? Compressing, writing to Access or getting it back out?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice point, nothing to do with Servlets.
This thread has been moved to the JDBC forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic