<!--#include file="db.asp"-->
<%
conn.open Str

Dim cmd
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = conn
cmd.CommandType = 1 
if request.QueryString("dibujoid")<>"" then
cmd.CommandText = "select * from dibujo where dibujoid= '"&request.QueryString("dibujoid")&"';"
Dim rs
Set rs = cmd.Execute

If Not rs.EOF Then
    Dim binaryData
    binaryData = rs("Dibujo")

    Response.ContentType = "image/jpeg"
    Response.BinaryWrite binaryData
Else
 Response.Redirect("/img/sinimages.png")
End If

rs.Close
conn.Close


Set rs = Nothing
Set cmd = Nothing
Set conn = Nothing
end if
%>