February 21, 2008 at 10:07 pm
Hi,
Can any one plz tell me how can i store and retrive image in sql server 2005 table.
Thanks in advance.
Faheem Latif
Best Regards
Faheem latif
Senior Database Architect
Genie Technologies (Pvt.) Ltd.
February 22, 2008 at 8:27 am
If you should choose to store images in the database versus storing image paths, you can use the new datatype varbinary(max). You can insert an image into your table in a binary format. Or you can use the image datatype. The biggest misconception is that you can recreate an image from the binary data stored in the table, but this is not true. In order to recreate the binary image, you must use the .NET binary reader. The links below will provide much greater detail and should point you in the right direction.
Personally, I prefer to store file paths to images and just reference the path. This saves on database storage and makes retrieving the images easier for applications.
http://www.eggheadcafe.com/articles/20030624.asp
http://www.codeproject.com/aspnet/PicManager.asp
http://chiragrdarji.wordpress.com/2007/03/05/storing-and-retrieving-image-in-sql-server/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply