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
 General SQL Server Forums
 New to SQL Server Administration
 storing file path

Author  Topic 

tudortnt
Starting Member

1 Post

Posted - 2012-04-14 : 06:33:19
Hi,
I want to display a image in picture box in visual studio. This image has to be retrieved from sql server 2008 database table. Now how shud i save the image in the table, so that i can retrive it in visual studio. I would like to store only the image path in the database. so please suggest me

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2012-04-14 : 08:56:26
if the solution is deployed on the server then your local path wont work,will through an error.please keep the image on the server folder and then give the same path in database column.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-04-14 : 09:10:05
Take a look at FILESTREAM in Books Online - which will allow you to save the image file to SQL Server and SQL Server will save it to the file system. You can setup that file system for access directly so your program can get to the image file directly using UNC path that is stored in the database.
Go to Top of Page
   

- Advertisement -