Modificare il file:
\Buoni_Spesa_2015\Buoni-Spesa-2015-01\Elimina.asp
<%@LANGUAGE = VBScript%> <!--#include file="config.asp"--> <% Dim C, D %> <html> <head> <title>Eliminazione Record di una tabella</title> </head> <body> <% Dim Cn, Rs ' Recupero il record con il codice inserito C = Request.Form("codice") ' Mi connetto al database Set Cn = Server.CreateObject("ADODB.Connection") Cn.Open StrCn ' Verifico che il record esista Dim SQL SQL = "SELECT * FROM tabella WHERE Codice = '" & C & "';" Set Rs = Server.CreateObject("ADODB.Recordset") rs.open SQL, cn If rs.EOF=True and rs.BOF=True Then Response.Write "<p align=""center"">Il codice specificato non esiste</p>" else %> <table border="1"> <form method="post" action="RegistraDel.asp"> <tr> <td>Codice<br> <input type="text" name="Codice" value="<%=Rs("Codice")%>" maxlength="10" style="width: 100%;"> Descrizione<br> <input type="text" name="Descrizione" value="<%=Rs("Descrizione")%>" maxlength="80" style="width: 100%;"> </td> </tr> <tr> <td align="right"> <input type="submit" value="Elimina"></td> </tr> </form> </table> <% End If rs.Close set Rs = Nothing Cn.Close Set Cn = Nothing %> <a href='home.html'>Indietro</a></p> </body> </html>
[
Íàçàä
]