标题:图片上传到SQL
取消只看楼主
unix
Rank: 1
等 级:新手上路
帖 子:134
专家分:0
注 册:2005-12-28
 问题点数:0 回复次数:0 
图片上传到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
%>

不报错,可是怎么在数据里还是空的呢?
搜索更多相关主题的帖子: SQL 
2006-03-20 15:20



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-51600-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.091162 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved