One other thing to add to that...
When storing images on SQL Server in will store them as binary data like
this:
0x151C2F00020000000D000E0014002100...<more HEX
numbers>...FFFF9BFFFFFFFFFFFFFFFFE000000000000
Which doesn't look to pretty on a web page. You would have to use some type
of picture control on your page to render the binary data back into an
image.
As opposed to just doing an <IMG src="<urlpath or relative
path>/<imagename>.jpg">
--
Darren Brinksneader MCDBA, MCSE+I, CNE, CCA, MCT, CTT
> A suggestion would be "Don't do it". Have a search through this News
group
> and you will find this question asked a lot. The answer almost always
comes
> back as "Don't do it". SQL server performance will be degraded. IIS has
> caching in-built, which means that it will cache the pictures and certain
> objects. By placing them in a database you negate this cache, so every
time
> you want a 2MB picture you have to retrieve it from a database. This
> database is normally on a separate server to the public web server. So
you
> have to transfer is across the internal network as well. There is nothing
> wrong with storing images and documents in a directory , that's what they
> are there for, that's what they are good at. DB are good at data storage
> SQL DB are good at storing lots or records and retrieving them in
different
> orders. Let each one do there job and you will be netter off.
> regards
> Greg O
> > Hi,
> > I am working on a database that contains some records that reference a
> > picture. As things stand right now, the pictures are stored in a
> directory
> > somewhere on the server. The DB records are pulled by some ASP code,
and
> > the picture is displayed across the web. I've noticed that SQL has an
> image
> > datatype, and I was wondering what would be the advantages to storing an
> > image in the DB as opposed to separately as a file, as well as the steps
> > need to store and retrieve the image across the web. Thanks.
> > Xin Li