请那位高手帮我分析这个ASP程序!!!

chenyajun109 2001-04-18 06:01:00
我想把ACCESS 库中 email字段中含有网址的记录的字段code付值2
编的程序如下:
<!--#include virtual="/conn.inc"-->
<%
sql1="select * from lanm where email<>'' "
set rs1=conn.execute(sql1)

while not rs1.eof
em2=rs1("email")
em1=replace(em2,"www","是网址")

if instr(em1,"是网址")>0 then
url=rs1("email")


sql2="update lanm set code='2' where id="&rs1("id")
conn.execute(sql2)
end if
rs1.movenext
wend
response.write "转换成功"
%>
请那位高手帮我分析一下为什麽执行出错(conn.execute(sql2)这句),另外
还有什麽好的方法解决这类问题?多谢!!!
...全文
74 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
kickken 2001-04-18
  • 打赏
  • 举报
回复
把 conn.execute (sql2) 改成 conn.execute sql2 试试
BrentIvan 2001-04-18
  • 打赏
  • 举报
回复
你打开了rs1,对lanm上了锁,rs1不关闭的是否不能另外修改该表的

sql1="select * from lanm where email<>'' "
set rs1=Server.CreateObject("ADODB.Recordset")
rst.Open sql1, conn, 3, 3

while not rs1.eof
em2=rs1("email")
em1=replace(em2,"www","是网址")

if instr(em1,"是网址")>0 then
url=rs1("email")

rs1("code") = 2
rs1.Update
end if
rs1.movenext
wend
response.write "转换成功"

28,406

社区成员

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

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