Adding link to external photos in SQL 2000 db

  • 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.

  • 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.

  • 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.

  • 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

  • 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.

  • Thanks very much, Todd, that gave me the insights I needed.

    Kenena

  • You might be interested in the new Filestream feature of SQL Server 2008.

    http://msdn.microsoft.com/en-us/library/bb933993(SQL.100).aspx

  • 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

  • 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