April 7, 2008 at 4:01 pm
Does anyone have a link to instructions for creating a database field designed so that the application can link to and pull up an image .jpg or .pdf file from a server folder? Any info and/or direction would be appreciated.
Thanks.
April 7, 2008 at 4:52 pm
You can just used a varchar or nvarchar field to store the path. Then your GUI will use that as its path into the file system.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 7, 2008 at 4:56 pm
Here's a relatively straightforward way of doing that.
1. In IIS configure a virtual directory that points to the location of the .JPG files.
2. In SQL, store the relative path in a VARCHAR field in the table.
3. In the application, use the relative path from the table and construct a URL.
April 10, 2008 at 4:52 pm
Hi Todd,
Thanks for the reply, I appreciate your time. This is uncharted territory for me, is there any chance you could provide more details or direct me to good reading material?
Thanks again,
Kenena
April 11, 2008 at 5:32 am
The attached zip file contains a document with some more detail on each of those steps.
Just keep in mind there are other ways of storing and displaying images, this is just one of them.
April 11, 2008 at 10:03 am
Thanks very much, Todd, that gave me the insights I needed.
Kenena
May 24, 2008 at 11:54 am
You might be interested in the new Filestream feature of SQL Server 2008.
http://msdn.microsoft.com/en-us/library/bb933993(SQL.100).aspx
May 27, 2008 at 10:07 am
Thanks, David, for responding. I took a peek at that info and will review it further. What I was unable to figure out is how the application field is triggered to go out and get the photo from the network. If you know how that is done, I'd appreciate it.
Kenena
May 27, 2008 at 2:50 pm
The application just sees the FILESTREAM value as a regular Windows file handle. The handle is created using the Filestream API and a virtual file path. The app never sees the actual file path on the server and doesn't need access to that file.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply