ASP批量更新代码
2018-09-06 13:19
  <!--#includefile=../Conn.asp--> 
<% 
setrs=server.createobject(adodb.recordset) 
sql=select*fromarticlewherebigtypes=我爱你orderbyiddesc找出数据库内类别为我爱你的所有数据 
rs.opensql,conn,1,3 
ifnotrs.eofthen 
dowhilenotrs.eof 
fname=rs(id)&.html 
folder=../html/Info/ 
c_filepath=folder&fname 
rs(filepath)=c_filepath 
rs.update 
rs.movenext 
loop 
endif 
response.redirect成功..... 
%>
解决方法:
复制代码 代码如下:
<% 
setrs=server.createobject(adodb.recordset) 
sql=select*fromarticlewherebigtypes=我爱你orderbyiddesc找出数据库内类别为我爱你的所有数据 
rs.opensql,conn,1,3 
ifnotrs.eofthen 
dowhilenotrs.eof 
fname=rs(id)&.html 
folder=../html/Info/ 
c_filepath=folder&fname 
conn.execute(updatearticlesetfilepath=&c_filepath&whereid=&rs(id)) 
rs.movenext 
loop 
endif 
response.redirect成功..... 
%>
上一篇:研究动网得到的一些动网参数
下一篇:asp实现带刷新功能的验证码代码