网络编程 
首页 > 网络编程 > 浏览文章

ASP批量更新代码

(编辑:jimmy 日期: 2024/9/22 浏览:3 次 )
<!--#include file="../Conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from article where bigtypes='我爱你'order by id desc"   找出数据库内类别为我爱你的所有数据
rs.open sql,conn,1,3
if not rs.eof then
do while not rs.eof
fname = rs("id")&".html"
folder = "../html/Info/"
c_filepath = folder&fname

rs("filepath")=c_filepath
rs.update

rs.movenext
loop
end if
response.redirect "成功....."
%>
解决方法:
复制代码 代码如下:
<%
set rs=server.createobject("adodb.recordset")
sql="select * from article where bigtypes='我爱你'order by id desc"   找出数据库内类别为我爱你的所有数据
rs.open sql,conn,1,3
if not rs.eof then
do while not rs.eof
fname = rs("id")&".html"
folder = "../html/Info/"
c_filepath = folder&fname

conn.execute("update article set filepath='"&c_filepath&"' where id="&rs("id"))

rs.movenext
loop
end if
response.redirect "成功....."
%>
上一篇:asp飞飞无限级分类v1.0 Asp+sql+存储过程+ajax提供下载
下一篇:一想千开PJblog审核功能补丁 v2.0版 发布第1/3页
一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap