asp表单提交图片出错:
Microsoft VBScript 运行时错误 错误 '800a0005'
无效的过程调用或参数: 'leftB'
/test3/image_Test.asp,行 8
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
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 conn=Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("images.mdb")
Set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [images] where id is null",conn,1,3
rs.addnew
rs("img").appendchunk mydata
rs.update
rs.close
set rs=nothing
set conn=nothing
%></%>