jrthor2
04-15-2003, 09:23 AM
Can someone please tell me the problem with this update statement? I use the same statement on another part of my site with no problems. I get the following error:
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/Members/_update.asp, line 41
Here is my code:
Set conn = server.createobject("adodb.connection")
DSNtemp="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("members.mdb")
conn.Open DSNtemp
SQLstmt = "UPDATE MemberList SET "
SQLstmt = SQLstmt & "LastName='" & Trim(Request.Form("last_name")) & "',"
SQLstmt = SQLstmt & "FirstName='" & Trim(Request.Form("first_name")) & "',"
SQLstmt = SQLstmt & "Address1='" & Trim(Request.Form("Address1")) & "',"
SQLstmt = SQLstmt & "Address2='" & Trim(Request.Form("Address2")) & "',"
SQLstmt = SQLstmt & "CityState='" & Trim(Request.Form("city_state")) & "',"
SQLstmt = SQLstmt & "Zip='" & Trim(Request.Form("zip")) & "',"
SQLstmt = SQLstmt & " WHERE ID=" & TRIM(Request.Form("memberid"))
response.write(SQLstmt)
conn.execute(SQLstmt)
conn.Close
Set conn = nothing
Set SQLstmt = nothing
Thanks
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/Members/_update.asp, line 41
Here is my code:
Set conn = server.createobject("adodb.connection")
DSNtemp="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("members.mdb")
conn.Open DSNtemp
SQLstmt = "UPDATE MemberList SET "
SQLstmt = SQLstmt & "LastName='" & Trim(Request.Form("last_name")) & "',"
SQLstmt = SQLstmt & "FirstName='" & Trim(Request.Form("first_name")) & "',"
SQLstmt = SQLstmt & "Address1='" & Trim(Request.Form("Address1")) & "',"
SQLstmt = SQLstmt & "Address2='" & Trim(Request.Form("Address2")) & "',"
SQLstmt = SQLstmt & "CityState='" & Trim(Request.Form("city_state")) & "',"
SQLstmt = SQLstmt & "Zip='" & Trim(Request.Form("zip")) & "',"
SQLstmt = SQLstmt & " WHERE ID=" & TRIM(Request.Form("memberid"))
response.write(SQLstmt)
conn.execute(SQLstmt)
conn.Close
Set conn = nothing
Set SQLstmt = nothing
Thanks