用纯ASP代码实现图片上传并存入sqi数据库中 ,但无法读出......
图片上传部门正常,读出部分的代码如下;
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
set conn=server.CreateObject("ADODB.connection")
connstr="provider=sqloledb;user id=*******;password=*******;initial catalog=******;data source=*******"
conn.Open connstr
set rec=server.createobject("ADODB.recordset")
strsql="select img from pic where id "&trim(request("id"))
rec.open strsql,conn,1,3
Response.ContentType = "image/*"
Response.BinaryWrite
rec("img").getChunk(7500000)
rec.close
set rec=nothing
set conn=nothing
%>
</body>
</html>