Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Stroring Word Documents into MYSQL Database

 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am writing a web application that would allow users to upload word Document files, I am using Hibernate to access the MySQL database. Please does any one have suggestion about how i can write the application that is how to store word documents into a MYSQL database
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Word documents are only binary data: you should be able to store them as BLOBs in an SQL database... I don't use Hibernate though, so can't suggest anything there. This is probably better off in the JDBC forum. If you want Web app advice, try the Servlets or JSP forums - as a hint, you'll want to use a form (probably HTML or JSP) with HTTP POST and a servlet to receive the POST data.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charles suggestion is correct. We use BLOBs to store PDF documents but to ORACLE instead of MYSQL. I'm not sure Hibernate can handle BLOB data though I have very little experience with it. And CRUDing BLOBs usually is not as simple as INSERT, SELECT, UPDATE and DELETE. So I too would suggest plain JDBC.
 
Marshal
Posts: 25815
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate works fine with BLOB data, I use it to store images in a DB2 database.
 
Trust God, but always tether your camel... to this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic