一个小问题..在线等~~~

lxrcher lxrcher 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<%

Response.Expires = 0

Response.buffer=True

Response.clear

'创建对象实例

Set imgConn=Server.CreateObject("ADODB.Connection")

StrConn="DBQ="+server.mappath("test.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"

imgConn.open strConn

Set Rs= Server.CreateObject("ADODB.RecordSet")

Sql="Select img From img Where id=1" '这里的id可以使用Request(“id”)获得

Rs.open sql,imgConn,1,1

Response.ContentType="image/*"
Response.BinaryWrite Rs.("img").GetChunk(7500000)

'关闭和释放对象

Rs.close

ImgConn.close

Set Rs=Nothing

Set ImgConn=Nothing

%>

这是那段把图片上传到数据库并显示出来的代码......为什么我的这一行Response.BinaryWrite Rs.("img").GetChunk(7500000)老提示缺少表示符呀....弄了好久了 都不知道是什么原因


...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
lxrcher
ASP 28,401 成员 356,940 内容