关于asp上传图片的问题?
代码如下:
<%
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 rs=server.CreateObject( "adodb.recordset ")
rs.Open "select * from pic ",conn,1,3
rs.AddNew
rs( "img ").appendchunk mydata
rs.Update
rs.Close
set rs=nothing
Response.Write "文件上传成功 "
response.redirect "img.asp "
%>
出现的错误是:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E2F)
[Microsoft][ODBC Microsoft Access Driver]行中有错误
/t/upload.asp, 第 15 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
网页:
POST 75549 ??? /t/upload.asp
POST Data:
错误 '80020009 '
发生意外。
/iisHelp/common/500-100.asp,行 219
[解决办法]
解决了就恭喜,我猜你是不是因为没有人回复所以结不了帖??