SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 storing file path
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tudortnt
Starting Member

India
1 Posts

Posted - 04/14/2012 :  06:33:19  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

India
423 Posts

Posted - 04/14/2012 :  08:56:26  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
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

USA
693 Posts

Posted - 04/14/2012 :  09:10:05  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000