高手帮我看看ASP的更新数据库图片的代码对不对
<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%><%setcn=server.CreateObject("ADODB.CONNECTION")...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
set cn = server.CreateObject("ADODB.CONNECTION")
cn.open "DRIVER={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("/odb/goo.mdb")
%>
<%
response.buffer=true
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
%>
<%
set rec=server.createobject("ADODB.recordset")
rec.Open "update * FROM [image] where id=7",cn,1,3
rec.update
rec("img").appendchunk mydata
rec.update
rec.close
set rec=nothing
set cn=nothing
%> 展开
<%
set cn = server.CreateObject("ADODB.CONNECTION")
cn.open "DRIVER={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("/odb/goo.mdb")
%>
<%
response.buffer=true
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
%>
<%
set rec=server.createobject("ADODB.recordset")
rec.Open "update * FROM [image] where id=7",cn,1,3
rec.update
rec("img").appendchunk mydata
rec.update
rec.close
set rec=nothing
set cn=nothing
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询