aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "store image using sql server" Watch "store image using sql server" New topic

store image using sql server

Es Tan

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

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

GenRocket - A Test Data Generation Platform
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29234

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

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.
I agree. Here's the link:
subject: store image using sql server
Similar Threads
storing and retriveing image through Ms-sql
how to store an image object in the database
put image into database
Fetching Image Data
JDBC to SQL Server