ASP Batch Update code _ Application Tips

Source: Internet
Author: User
<!--#include file= ". /conn.asp "-->
<%
Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from article where bigtypes= ' I love you ' ORDER BY id DESC" Find the category in the database for all the data I love you
Rs.Open sql,conn,1,3
If not rs.eof then
Do as 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 "Success ..."
%>
Workaround:
Copy Code code as follows:

<%
Set rs=server.createobject ("Adodb.recordset")
Sql= " Select * from article where bigtypes= ' I love you ' Order by id desc      find the category within the database for all the data I love you
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&N Bsp;if
response.redirect  "Success ..."
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.