执行以下代码插入图片到数据库的时候提示"ADODB.Field (0x800A0C93)
在此环境中不允许操作。"
是哪里出了问题啊?提示说是第21 行出问题,那就是rs("pic"
.AppendChunk obj.DBContent啦,究竟是什么问题呢?
<%
Set obj = Server.CreateObject("LyfUpload.UploadFile"
xm = obj.request("xm"
ss1=obj.SaveFile("pic", Server.MapPath("/pic"
, true)
aa1=obj.filetype("pic"
cc1=obj.FileSize
%>
<%
strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/data/db.mdb"
session("strconn"
=strConn
Set dbc = Server.CreateObject("ADODB.Connection"
dbc.open strConn
set rs=server.CreateObject("adodb.recordset"
rs.Open "SELECT * FROM t1",dbc,1,3
%>
<%rs.AddNew
rs("xm"
=trim(xm)
rs("pic"
.AppendChunk obj.DBContent
rs.Update
rs.movelast
rs.Close
dbc.Close
set rs=nothing
set dbc=nothing
%>