<%
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)
set rs=server.CreateObject("adodb.recordset")
strconn="driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("test.mdb")
sql="SELECT * FROM imgtable"
rs.Open sql,strconn,1,3
rs.AddNew
rs("img").appendchunk Image
rs.Update
rs.Close
response.contenttype="image/gif"
response.binarywrite imageup(formsize,formdata)
%>