大哥,近来看看吧,烦了好多天了!(解决了才给分,不要乱up)
以下是一段图片上传代码在本机上测试没有错误
<!--#include file="conn.asp"--> '连接数据库
<%on error resume next
response.Buffer=true
set rs=server.CreateObject("adodb.recordset")
FormSize = Request.TotalBytes
FormData = Request.BinaryRead(FormSize)
function ImageUp(formsize,formdata)
bncrlf=chrb(13)&chrb(10)
divider=leftb(formdata,instrb(formdata,bncrlf)-1)
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
imageup=midb(formdata,datastart,dataend)
end function
Image=ImageUp(FormSize,Formdata)
rs.Open "imgtable",conn,3,2
rs.AddNew
rs("img").AppendChunk image
rs("domain").Value =session("domain")
rs.Update
if err then
response.Write err.Source &"<br>"
response.Write err.Description &"<br>"
end if
%>
传到网上后显示错误信息:
ADODB.Field
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
大哥,帮帮忙,说说这是为什么?