作家
登录

ASP批量更新代码

作者: 来源:www.28hudong.com 2013-03-30 08:30:40 阅读 我要评论

<!--#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中使用mysql数据库的注意实现

环境:winxp sp2 ,mysql5.0.18,mysql odbc 3.51 driver 表采用 myisam引擎。access 2003 不同的地方: 1、插入数据时候,mysql 应尽量使用 insert into语句,避免使用 rs.addnew,如果非的要用,应先设置 conn.Cu>>>详细阅读


本文标题:ASP批量更新代码

地址:http://www.17bianji.com/kaifa2/ASP/32284.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)