主题:  为何我不能更新数据库中的图片

lengfeng_5d

职务:普通成员
等级:1
金币:0.0
发贴:5
#12003/5/16 10:54:27
response.Buffer=true
info_id=session("info_id")
formsize=request.TotalBytes
if formsize>111600 then response.Redirect "admin_upload.asp?er=erorr" '如果大于100K时
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 rs1=server.CreateObject("adodb.recordset")
sql="select * from t_info where c_info_id="&info_id
rs1.open sql,conn,1,1
if rs1.eof then
rs1.addnew
rs1("c_username")="admin"
rs1("c_info_image").appendchunk mydata
rs1.update

end if
更新代码如上?



{ 在指尖上绽放的花朵 }

职务:普通成员
等级:5
金币:14.0
发贴:3209
#22003/5/16 14:41:11
sql="select * from t_info where c_info_id="&info_id 
[color=red]rs1.open sql,conn,3,2[/color]
if rs1.eof then 
rs1.addnew 
rs1("c_username")="admin" 
rs1("c_info_image").appendchunk mydata 
rs1.update 


似乎是数据库打开方式不对哦?