wood burning stoves*
The moose likes JDBC and the fly likes store image using sql server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "store image using sql server" Watch "store image using sql server" New topic
Author

store image using sql server

Es Tan
Greenhorn

Joined: Jul 05, 2006
Posts: 2
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

This has nothing to do with JSPs. Moving to our JDBC forum...


GenRocket - Experts at Building Test Data
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30405
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Es Tan
Greenhorn

Joined: Jul 05, 2006
Posts: 2
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

Joined: Aug 24, 2005
Posts: 518
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.
 
Consider Paul's rocket mass heater.
 
subject: store image using sql server