This is my script to load the image from the database:
<%@LANGUAGE="VBSCRIPT" %>
<!--#include file="db_connection.asp"-->
<%
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Dim sql
Dim rs
Dim userID,str
Set rs = Server.CreateObject("ADODB.Recordset")
str = "SELECT b.itemimg_image FROM sct_item_image b where b.item_id_no = 79"
rs.Open str, ooConn,3,3
Set rs= ooConn.execute(str)
if rs.eof then
Response.End
else
Response.ContentType = "image/jpeg"
Response.Buffer = True
Response.BinaryWrite rs("itemimg_image")
end if
rs.Close
ooConn.Close
%>
And this is the page to show the image:
<HTML>
<HEAD><TITLE>Display Image</TITLE></HEAD>
<BODY>
This page will display the image.<BR>
<IMG SRC="test_show_picture.asp">
</BODY>
</HTML>
The image is not displayed but only a small transparent image element. Any ideas?