Ciao a tutti,
ho modificato a mio uso lo scripts du LUKE per l'aggiunta, modifica ed eliminazione di un record;
Il mio db è composto da più campi ripetto all'originale ed ho questo problema in fase di UPDATE
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
/admin/modificateam.asp, line 74
ecco il codice:
codice:
<%
if (azione== "UPD")
{
var nr = new String(Request.Form("nr"));
var callsign = new String(Request.Form("callsign"));
var nomecognome = new String(Request.Form("nomecognome"));
var note = new String(Request.Form("note"));
if (callsign == "" || nomecognome == "")
{
Response.Redirect("modificateam.asp?id=" + id);
}
else
{
var r_nr = nr.replace(/'/g,"''");
var r_callsign = callsign.replace(/'/g,"''");
var r_nomecognome = nomecognome.replace(/'/g,"''");
var r_note = note.replace(/'/g,"''");
---> line 74 ---> Cn.Execute("UPDATE team SET nr = '" + r_nr + "', callsign = '" + r_callsign + "', nomecognome = '" + r_nomecognome + "', note = '" + r_note + "' WHERE id = " + id);
Cn.Close();
Response.Write("<p align=\"center\">Modifica effettuata!</p>");
}
}
%>
In cosa ho sbagliato???
Io non ho fatto altro che aggingere le righe per il campo in più, ovvero "nr"
Mi date una mano... GRAZIE!!
Saluti