• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

store image using sql server

 
Es Tan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am the beginner of jsp and like to know which is the best data type to store the image and how to retrieve the image from sql server 2000.
thank you.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with JSPs. Moving to our JDBC forum...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ES,
Welcome to JavaRanch!

You can store the image in a BLOB object. Search for "Blob" in this forum or the Sun JDBC tutorial for an example.
 
Es Tan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne. But the sql server doesn't support blob data type. I try to store in image type but don't know how to retrieve in jsp page.
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SQL Server's image datatype is a blob.

As Jeanne suggested, take a look at the Sun JDBC tutorial for an example. The Java API javadoc will be helpful as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic