Question : ASP - Deleting multiple records

Dear eXperts
I want to delete multiple record in an Access database.
There is a table, category, with categorynames and a table with products.
When the categorynames are .not. 'yes' the should be deleted fom the tabel revendeur.

My code doesn't work:
conn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & server.mappath("../../db/revendeur_es.mdb") & "; User Id=admin; Password=;"
'conn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("../db/revendeur_es.mdb")

Set rs2=Server.CreateObject("ADODB.Recordset")
strSql2 = "SELECT categoryname FROM category WHERE publish<>'yes'"
response.write strSql2 & "<br>"
rs2.open strSql2, conn


if rs2.eof then
else
      do until rs2.eof
      catname=rs2("categoryname")
      response.write "Catname:" & catname
      Set rs3=Server.CreateObject("ADODB.Recordset")
      strSql3 = "DELETE revendeur WHERE categoria='" & catname & "'"
      response.write strSql3 & "<br>"
      rs3.open strSql3, conn
rs2.movenext
loop
end if
--------------------------
This code doesn't work either
Set rs = Server.CreateObject("ADODB.Recordset")
sQuery = "SELECT categoria FROM revendeur WHERE categoria = '" & catname & "' "
rs.Open sQuery, conn
If Not rs.EOF Then
   Do Until rs.EOF
       
         rs.Delete
     
       rs.MoveNext
   Loop
End If

Answer : ASP - Deleting multiple records

Sounds like something is sending. YOu may want to have the user reboot in safe mode with networking and install and run Malwarebytes on the system. http://malewarebytes.org

Even if they cannot get ot safe mode, you may be able to still install and run malewarebytes in normal mode.
Random Solutions  
 
programming4us programming4us