Solved

Retrieve Image (jpeg) Stored In SQL Server

Posted on 2014-01-31
3
347 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 500 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

862 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now