asp上传图片和显示图片的问题

来源:百度知道 编辑:UC知道 时间:2024/06/27 04:56:10
图片已经能上传到ACCESS数据库的OLE字段了,但不能显示,以下是我显示图片的代码,但不能显示,请高手指点show.asp的代码
<%
set connGraph=server.CreateObject("ADODB.connection")
connGraph.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("data.mdb")
connGraph.Open
set rs=server.createobject("ADODB.recordset")
sql="select * from pic where id="&trim(request("id"))
rs.open sql,conn,1,1
Response.ContentType="image/*"
Response.BinaryWrite rs("img").getChunk(8000000)
rs.close
set rs=nothing
set conn=nothing
%>
index.asp的代码<%
set connGraph=server.CreateObject("ADODB.connection")
connGraph.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("data.mdb")
connGraph.Open
strsql="select * from pic"
set rs=server.createobject("ADODB.recordset")
rs.

<%
Response.Buffer = True
Server.ScriptTimeOut=9999999
On Error Resume Next
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta content="all" name="robots" />
<meta name="author" content="木目,Woodeye" />
<meta name="description" content="木目ASP文件上传工具" />
<meta name="keywords" con