• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Upload Image to DataBase

 
Mohammad Ali
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please guide me how to upload image in a table in a database.
please give me code how to upload an image file in a table in a Mysql database.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the image coming from? You need to convert it into a byte[] array, which you then store in a BLOB field.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mohammad Ali",

You have already been asked on a previous occasion to adjust your display name to match the JavaRanch Naming Policy. Please adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

bear
JavaRanch Sheriff
[ February 12, 2006: Message edited by: Bear Bibeault ]
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the URL below:

How to store/retrieve image to/from SQLServer
http://www.java-tips.org/content/view/203/29/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic