Skip navigation
bake1234
Currently Being Moderated

Display Image From Stored Procedure

Jun 15, 2012 10:41 AM

Tags: #problem #help #display #database #coding

I have a SQL query in a .ASP page using a stored procedure:

 

<%
sql="exec fp_qr_code '" & request.querystring("id") & "'"
set rs = Conn.Execute(sql)
if rs.eof then response.write("No Records")
while not rs.eof
response.write (rs("name"))

response.write (rs("imgname"))

response.write (rs("url"))

rs.movenext
wend
%>

 

When viewed in a browser, it displays all of the variables properly.  But what I need to do is display the actual image from:

 

response.write (rs("imgname"))

 

All it does is writes the name of the image. 

 

I tried <img src=<% response.write(session("imgname")) %> but that renders a 500 server error.

 

I have Googled this to death but can't seem to find a solution.  Any help would be most appreciated.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points