<% if request.querystring("action") = "new" then DIM CONN DIM RS DIM SQL Set CONN = server.createobject("ADODB.connection") conn.open "DSN=nothingtoit_7051" SQL = "SELECT name, entry_id FROM recipe_tbl ORDER BY name ASC;" Set RS=Server.createObject("Adodb.recordset") rs.open SQL, Conn response.write "" While not rs.eof response.write "" rs.movenext wend response.write "
Click to Delete Recipe
>" & rs("name") & "
" rs.close set rs= nothing conn.close set conn=nothing else set CONN = server.createObject("ADODB.connection") conn.open "DSN=nothingtoit_7051" SQL = "DELETE * FROM recipe_tbl WHERE entry_id =" & request.querystring("id") &";" set COMM = server.createObject("ADODB.command") comm.activeconnection = Conn comm.commandtext = SQL Comm.commandtype = adCmdText comm.execute response.write "The recipe has been successfully deleted.
" end if %>