图片上传到SQL
<html>
<body>
<center>
<form name="mainForm" enctype="multipart/form-data" action="process.asp" method=post>
<input type=file name=mefile><br>
<input type=submit name=ok value="上传">
</form>
</center>
</body>
</html>
<%
set db=server.createobject("adodb.connection")
db.open "Driver={SQL Server};server=127.0.0.1;database=生产管理;uid=sa;pwd=AM78!659081"
%>
<%
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")
sql="SELECT * FROM gouruping where lianluo='OM-0002'"
rs.open sql,db,1,3
rs.addnew
rs("images").appendchunk mydata
rs.update
rs.close
%>
set db=server.createobject("adodb.connection")
db.open "Driver={SQL Server};server=127.0.0.1;database=生产管理;uid=sa;pwd=AM78!659081"
%>
<%
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")
sql="SELECT * FROM gouruping where lianluo='OM-0002'"
rs.open sql,db,1,3
rs.addnew
rs("images").appendchunk mydata
rs.update
rs.close
%>
不报错,可是怎么在数据里还是空的呢?