Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help finding the problem with this

Status
Not open for further replies.
Feb 3, 2003
28
0
0
US
I've included, I think, everything you guys will need to help with this one.

This updates a user database (MS Access) with the data passed from another page. I've used this exact code (except for the SQL statement) on other pages and I haven't any problems until this page.
I get the following error:


Microsoft JET Database Engine error '80040e14'

Syntax error in UPDATE statement.

/html/edituser-process-page.asp, line 45


Line 45 is:
Code:
rsD.Open strSQL, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../database/users.mdb") & ";", adOpenKeyset, adLockPessimistic, adCmdText

The strSQL statement for line 45 is:
Code:
strSQL = "UPDATE tblUsers SET PW='" & password & "', Level='" & level & "', first_name='" & firstname & "', last_name='" & lastname & "', address_1='" & address1 & "', address_2='" & address2 & "', city='" & city & "', state='" & state & "', zip='" & zipcode & "', home_phone='" & homephone & "', work_phone='" & workphone & "', email_address='" & email & "' WHERE UserID='" & strUserID & "'"

The strSQL value is this when the error happens:
UPDATE tblUsers SET PW='123', Level='user', first_name='Johns', last_name='testuser02', address_1='123 bird lane', address_2='Null', city='anywhere', state='USA', zip='55555', home_phone='111-111-1111', work_phone='Null', email_address='johnstestuser02@anywhere.com' WHERE UserID='testuser02'


Again I've used this on other pages without issue. I can't seem to find the syntax error in the statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top