ASP批量修改数据库数据
求助.我的语句如下:
dbfolder="database/"
dbname="eshop.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/eshop.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
if Trim(Request("hw_zhekou")) <> "" then
zhekou=Trim(Request("hw_zhekou"))
if request("action")="editb" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from hw "
do while not rs.eof
if rs("sort_id")=request("sort_id") then
rs("hw_zhekou")=zhekou
rs.update
end if
rs.movenext
loop
rs.close
set rs=nothing
end if
else
response.write "请输入会员折扣!"
end if
---------------------------
结果:错误类型:
ADODB.Recordset (0x800A0E7D)
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。