Sid = SPLIT(ID, ", ")
For i = 0 To UBound(Sid)
Set Rs=Server.CreateObject( "ADODB.Recordset ")
Sql= "Select * From [Food_Food] "
Rs.Open Sql,Conn,1,3
Rs.Addnew
Rs( "Title ") = HTMLEncode(Title)
Rs( "Eatery ") = Sid(i)
Rs( "Content ") = Content
Rs( "Author ") = "Admin "
Rs( "Price ") = Price
Rs( "TasteScore ") = TasteScore
Rs( "PriceScore ") = PriceScore
Rs( "TotalScore ") = TotalScore
Rs( "isPass ") = Request.Form( "isPass ")
Rs( "isCommend ") = Request.Form( "isCommend ")
Rs( "UpTime ") = Now()
Rs( "UpIP ") = request.serverVariables( "remote_host ")
Rs.Update
Rs.Close
Set Rs = Nothing
Conn.ExeCute( "Update [Food_Eatery] Set FoodNum = FoodNum + 1 Where ID = " & Sid(i))
Next
------解决方案--------------------
Set Rs=Server.CreateObject( "ADODB.Recordset ")
Sql= "Select * From [Food_Food] "
Rs.Open Sql,Conn,1,3
和
Rs.Close
Set Rs = Nothing
放到for 之外