ASP批量修改数据库数据

nic2007 2007-07-29 08:12:44
求助.我的语句如下:

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)
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。
...全文
275 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧