<% y = request.form("product") %>
<% dim conntemp, rstemp
accessdb="fgp1.mdb" 'Specify Database, Driver, path...
myDSN="DRIVER={Microsoft Access Driver (*.mdb)};" ' MS Access driver
myDSN=myDSN & "DBQ=" & server.mappath(accessdb) ' Map path to DB
mySQL="DELETE * FROM Test1 WHERE RDrugComNm = '" & y & "'"
set conntemp=server.createobject("adodb.connection") 'Set a temporary connection (conntemp)
conntemp.open myDSN 'Open the connection
set rstemp=conntemp.execute(mySQL) 'Exec SQL and count fields - build a temporary recordset (rstemp)
howmanyfields=rstemp.fields.count -1 'Stop and Count fields in Recordset
%>
Product <% response.write(y) %> deleted
back