• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save jpeg in mysql

 
ramandeep singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am making struts application in which i need to put .jpeg image,resume.doc or resume.rtf file in to Mysql database
how can i do tht ,
i tried setBlob(byte[])
and
try {

pst.setBinaryStream(18,form.getpic().getInputStream());
} catch (FileNotFoundException ex) {
errors.add("sqlError",new ActionMessage("errors.resume.emptyfile"));
} catch (IOException ex) {
errors.add("sqlError",new ActionMessage("errors.resume.emptyfile"));
}
but they are causing exceptions ,can i also save the .doc file in same format and how to download them
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found something related with your query to storing jpeg files into MySQL database
see this link hope it helps..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic