主程序:
<%
response.write "<img src = showimg1.asp?id=" + request("id") + ">"
%>
showimg1.asp
<%
dim conn
dim connstr
connstr="Driver={SQL Server};Database=xxxx;Server=xxxx;Uid=xxx;pwd=xxxx"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
dim sql,rs
set rs = server.createobject("adodb.recordset")
sql = "select xxxx from xxx where id = '" + request("id") + "'"
rs.open sql, conn, 1, 1
response.contenttype = "image/*"
response.binarywrite rs("gyjslx").getchunk(7500000)
rs.close
set rs=nothing
conn.close
set conn=nothing
%>