我怎么显示不出图象?
hanjf 2004-01-06 05:49:42
我怎么显示不出图象?大侠帮我看看我的代码:
<!--#include file="../sql.asp"-->
<%
id=request("id")
server.CreateObject("ADODB.Recordset")
ssql="select img from mynews where id='" & id &"'"
rsPic.open ssql,conn,3,3
Response.ContentType = "image/*"
Response.BinaryWrite rsPic("img").getChunk(7500000)
'response.BinaryWrite rs.fields("LOGO_IMG")
response.write("end of the file")
rsPic.close
set rsPic=nothing
%>
sql.asp代码:
<%
'Session.Timeout = 10
Dim Conn, strConn
set Conn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=SQLOLEDB; Data Source=fred; Initial Catalog=hjfdb; User ID=SA; Password=1234"
conn.open strConn
%>