Problem in Image Retrieving from Oracle in ASP
I am trying to retrieve picture of Long Raw Data Type stored in Oracle,
in ASP page by using following code but garbage characters are printing
rather then picture. Please help
<!--#include file="Includes/connection.asp"-->
<%
Response.Expires = 0
Response.Buffer = TRUE
Response.ContentType = "image/JPEG"
Dim picstr
sql="select picture from Pic where id='4445662' "
If RS.state=1 then RS.close
set RS = db.execute(sql)
If not RS.Eof then
picstr = RS("picture")
%>
<img src="<%Response.BinaryWrite (picstr)%>">
<%
Response.End()
end if
RS.close
Set RS=nothing
%>
Last edited by Aziz; October 2nd, 2010 at 11:06 AM.
|