Salve a tutti e Buon Natale!
Sono 3 giorni che guardo e riguardo il codice che è riportato quì sotto, ma non vedo errori. Qualcuno è così gentile da illuminarmi? Ve ne sarò eternamente grato
##### Inizio Errore:
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/italia/modifica.asp, line 34
##### Fine errore
##### Inizio codice Form:
<%
response.expires = -1500
response.AddHeader "PRAGMA", "NO-CACHE"
response.CacheControl = "PRIVATE"
response.write "<p align=left style=""margin-left:6;"">"
if Session("ItaliaAuth")="VERO" then
Dim con, rs1, rs2, StrConnString, email
StrConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\mdb-database\italiacos.mdb")
SQL1 = "SELECT email FROM utenti WHERE StrComp(nick, '" &Session("ItaliaUser")& "', 0) = 0"
SQL2 = "SELECT * FROM utenti WHERE StrComp(nick, '" &Session("ItaliaUser")& "', 0) = 0"
set con = Server.CreateObject("ADODB.Connection")
con.Open strConnString
set rs1 = con.Execute(SQL1)
email = rs1("email")
rs1.Close
con.Close
con.Open strConnString
set rs2 = con.Execute(SQL2)
if rs2("sesso") = "M" Then
sessoForm = "F"
else
sessoForm = "M"
end if
response.write "<center><FORM method=POST action=modifica.asp>"
response.write " <TABLE WIDTH=""400"" ALIGN=CENTER BORDER=0 STYLE==font-size:12px ; font-family :verdana>"
response.write " <TR><TD ALIGN=LEFT><span class=txt1>User ID:</span></td>"
response.write " <TD ALIGN=LEFT><span class=txt1>" & rs2("id")
response.write " <input type=hidden name=id value=""" & rs2("id") & """></td>"
response.write " </TR>"
response.write " <TR><TD ALIGN=LEFT><span class=txt1>Nick:</span></td>"
response.write " <TD ALIGN=LEFT><span class=txt1>" & rs2("nick")
response.write " <input type=hidden name=nick value=""" & rs2("nick") & """></td>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Password:</span></td>"
response.write " <TD ALIGN=LEFT><input type=text name=password size=20 maxlength=20 class=field value=""" & Session("ItaliaPass") & """><span class=txt7>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Nome reale:</span></td>"
response.write " <TD ALIGN=LEFT><input type=text name=nome size=20 maxlength=25 class=field value=""" & rs2("nome") & """>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Città:</span></td>"
response.write " <TD ALIGN=LEFT><input type=text name=citta size=20 maxlength=30 class=field value=""" & rs2("citta") & """> Prov: <input type=text name=prov maxlength=3 size=3 class=field value=""" & rs2("prov") & """>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Data di nascita:</span></td>"
response.write " <TD ALIGN=LEFT><a><input type=text name=data_nascita size=11 maxlength=10 class=field value=""" & rs2("data_nascita") & """> gg/mm/aaaa</a>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Sesso:</span></td>"
response.write " <TD ALIGN=LEFT><select size=1 name=sesso><option selected>"& rs2("sesso") &"</option><option>" & sessoForm & "</option></select><span class=txt7>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>E-mail:</span></td>"
response.write " <TD ALIGN=LEFT><input type=text name=email size=20 maxlength=100 class=field value=""" & rs2("email") & """>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD ALIGN=LEFT><span class=txt1>Descrizione:</span></td>"
response.write " <TD ALIGN=LEFT><textarea rows=10 cols=70 name=descrizione hr class=field>" & rs2("DESCRIZIONE") & "</textarea>"
response.write " </TD>"
response.write " </TR>"
response.write " <TR>"
response.write " <TD COLSPAN=2 ALIGN=CENTER>"
response.write " <INPUT TYPE=HIDDEN NAME=""whereiam"" VALUE=""" & Request.ServerVariables("PATH_INFO") & """>"
response.write " <INPUT TYPE=SUBMIT NAME=""show"" VALUE=""Modifica profilo"" hr class=field>"
response.write " </TD>"
response.write " </TR>"
response.write " </TABLE>"
response.write "</FORM>"
response.write "<table width=400 border=0><tr><td align=center width=""100%""><img src=" &rs2("immagine")& " width=120 height=90></td></tr><tr>"
response.write "<td colspan=2 align=center STYLE==font-size:12px ; font-family :verdana><a>< <a href=modify_foto.asp class=link1>Modifica foto</a> ></a></td></tr></table>"
rs2.close
con.close
set rs1 = nothing
set rs2 = nothing
set con = nothing
else
response.write "<center><span STYLE==font-size:12px ; font-family :verdana class=title1>Errore: non sei loggato!</span></center>"
end if
response.write "</p>"
%>
##### Fine codice Form
##### Inizio codice modifica.asp:
<%
response.expires = -1500
response.AddHeader "PRAGMA", "NO-CACHE"
response.CacheControl = "PRIVATE"
if Session("ItaliaAuth")="VERO" then
Dim id, nick, password, nome, citta, data_nascita, sesso, email, descrizione, whereiam
id = Request.Form("id")
nick = Request.Form("nick")
password = Request.Form("password")
nome = Request.Form("nome")
citta = Request.Form("citta")
data_nascita = Request.Form("data_nascita")
sesso = Request.Form("sesso")
email = Request.Form("email")
descrizione = Request.Form("descrizione")
whereiam = Request.Form("whereiam")
password = Replace(password, "'", "''")
nome = Replace(nome, "'", "''")
citta = Replace(citta, "'", "''")
data_nascita = Replace(data_nascita, "'", "''")
sesso = Replace(sesso, "'", "''")
email = Replace(email, "'", "''")
descrizione = Replace(descrizione, "'", "''")
Dim con, rs1, StrConnString
StrConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\mdb-database\italiacos.mdb")
campi="password ='"&password&"',nome='"&nome&"',citta='"&citta&"',data_nascita='"&data_nascita&"',sesso='"&sesso&"',email='"& email&"',descrizione='"&descrizione&"'"
dove = "id="&id
SQL1 ="update utenti set "& campi &" where "& dove
set con = Server.CreateObject("ADODB.Connection")
con.Open strConnString
set rs1 = con.Execute(SQL1)
con.Close
set rs1 = nothing
set con = nothing
Session("Italiapassword")=password
Response.Redirect(whereiam)
else
Response.Redirect("../italia/home.asp")
end if
%>
##### Fine codice modifica.asp