紧急问题,多谢帮忙解决啦
我要做上传一个文件到一个表的一个字段,这应该怎么做呢?
字段类型要改成OLE
FormSize = Request.TotalBytes
FormData = Request.BinaryRead(FormSize)
Image=ImageUp (FormSize,Formdata)
set rs=server.CreateObject("adodb.recordset")
sql="select * from news WHERE id ="&id
rs.Open sql,conn,1,3
rs("pic") = NULL
rs("pic").appendchunk Image
rs.update
rs.close
set rs=nothing
set ts=nothing
conn.close
set conn=nothing
response.write "完成"
%>
<%
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
%>
这个具体什么意思我也不太明白,反正可以用。