?
Solved

Retrieve Image (jpeg) Stored In SQL Server

Posted on 2014-01-31
3
Medium Priority
?
360 Views
Last Modified: 2014-02-06
Hello

I am using TSQL to dynamically construct an html email for our customers. I need to retrieve and insert a signature (stored jpeg image in sql server table) into a section of the email. The signature will vary, depending on who the customer service rep is for the customer.

I can determine which signature to pull from the database, but am not sure how I can include it in the html of the email.

Any suggestions as to how to do this?

Thanks
0
Comment
Question by:force3inc
  • 2
3 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39825780
So to be clear you have chosen to store the jpeg in the database.  Is that correct?
0
 

Author Comment

by:force3inc
ID: 39827888
Yes, I need to do this because the image I need to retrieve depends on a user id variable in my stored procedure - it can vary....

Thanks
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1500 total points
ID: 39827991
I understand.  It is just that typically it is best to store the image on the file system and just have the name in the database.  Another approach is to use a "hybrid" solution using SQL Server's FILESTREAM storage volume.

Having said that if you need to retrieve an image store in SQL Server you will need to rely on your front-end language (VB6, .NET, etc.) in order to do that.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question