Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Storing Photos

Author  Topic 

keithc1
Yak Posting Veteran

88 Posts

Posted - 2004-07-10 : 18:47:44
I was looking at employee table design in Northwind and it has a column name of "Photopath" and this is nvarchar(255) and the values stored are HTTP links to where the actual photo is. I also noticed in this table a "Photo" column and its datatype is Image and does not come up in the column list of Select * from employees. I was wondering if the Photopath and Photo columns relate to one another? How would you bring up this photo, like would it have to be accessed via a browser or some app that is capeable of displaying it, how is it done? Why is the image column in there as well if there is a pointer to the photo? Does sql bring the photo in to the db once its selected or something?

Keithc MCSE MCSA

MichaelP
Jedi Yak

2489 Posts

Posted - 2004-07-10 : 19:32:33
If you do some searching on this forum about "storing images in SQL Server" you'll find that it's best to stay away from the Image columns, and just store the path to the images in SQL server.

There are very few advantages of storing the images inside of SQL server. Let the file system handle files, and let SQL server handle the data.

To answer your question about the image column, you basically convert that binary data into something your app can read.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page
   

- Advertisement -