hej jeg har lige et problem.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by='århus', land='denmark', email='andersen' where id=2' at line 1
/cityscapeasp/bruger/include/case.asp, line 295
og her response.write sqlup
UPDATE bruger SET bruger='b', password='b', navn='brian', adr='vej', postnr=8900, by='randers', land='denmark', email='andersen' where id=2
min ASP kode ser sådan her ud
<%
if request.ServerVariables("content_length") > 0 Then
var_form_id = request.querystring("id")
var_form_bruger = Replace(request.form("form_bruger"),"'", "")
var_form_Password = Replace(request.form("form_Password"),"'", "")
var_form_Navn = Replace(request.form("form_Navn"),"'", "")
var_form_Adr = Replace(request.form("form_Adr"),"'", "")
var_form_postnr = Replace(request.form("form_postnr"),"'", "")
var_form_By = Replace(request.form("form_By"),"'", "")
var_form_Land = Replace(request.form("form_Land"),"'", "")
var_form_Email = Replace(request.form("form_Email"),"'", "")
sqlup = "UPDATE bruger SET bruger='"&var_form_bruger&"', password='"&var_form_Password&"', navn='"&var_form_Navn&"', adr='"&var_form_Adr&"', postnr="&var_form_postnr&", by='"&var_form_By&"', land='"&var_form_Land&"', email='"&var_form_Email&"' where id="&var_form_id& ""
Conn.Execute(sqlup)
End if
%>
men jeg får hele tiden den samme fejl, i nærheden af where id="&var_form_id& "" i update sætningen, er der nogen der kan se fejlen ??????
Indlæg senest redigeret d. 22.07.2008 14:46 af Bruger #13270