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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL error - missing operator?

Status
Not open for further replies.

dbonneville

Programmer
Feb 8, 2001
1
US
Can anyone see what is causing this to error out? Anyone with more SQL than me should be able to spot this, and that's not too much! this is the error...the code is below...

Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'id = 1'.


SQL = "update login set username='doug', password='doug' where id = 1"

Data Source = "oos"

SQL = "update login set username='doug', password='doug' where id = 1"


The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (1:1) to (1:42) in the template file D:\cust\oos\web\updateUserInfo.cfm

The specific sequence of files included or processed is:
D:\CUST\OOS\WEB\UPDATEUSERINFO.CFM .


Date/Time: 02/08/01 15:58:14
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Remote Address: 192.168.1.100
HTTP Referer: Template: D:\cust\oos\web\updateUserInfo.cfm





CODE:

<cfquery name=&quot;updating&quot; datasource=&quot;oos&quot;>
update login
set username='#form.newusername#',
password='#form.newpassword#'
where id = #cookie.primaryid#
</cfquery>
 
Try placing a semicolon following the SQL as in:

SQL = &quot;update login set username='doug', password='doug' where id = 1;&quot;

I don't see any other problem with it.

Steve King
 
You may want to try:

SQL = &quot;update login set username='doug', password='doug' where id = '1'&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top