亲宝软件园·资讯

展开

ASP批量更新 ASP批量更新代码

人气:0
想了解ASP批量更新代码的相关内容吗,在本文为您仔细讲解ASP批量更新的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:ASP,批量更新,下面大家一起来学习吧。
<!--#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 "成功....."
%>

加载全部内容

相关教程
猜你喜欢
用户评论