You've got to replace your double quotes with single quotes around the
text values, otherwise SQL thinks you're trying to update a column.

Old:
SET LastName = "#form.lname#",

New:
SET LastName = '#form.lname#',


Matthew Small
IT Supervisor
Showstopper National Dance Competitions
3660 Old Kings Hwy 
Murrells Inlet, SC 29576
843-357-1847
http://www.showstopperonline.com

-----Original Message-----
From: Scott Wilhelm [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 10, 2003 1:08 PM
To: CF-Talk
Subject: HELP PLEASE!!!!

I keep getting the following error:
 

Error Diagnostic Information


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



[Microsoft][ODBC Microsoft Access Driver] Invalid bracketing of name
'[EMAIL PROTECTED]'. 



SQL = "UPDATE Staff SET LastName = "11", FirstName = "21", Building =
"West Side Elementary", DeptCode = "09", Job = "3", Extension = 4,
[Alternate Phone] = 3864504, [Alt Extension] = 5, Email = "[EMAIL PROTECTED]",
GroupCode = 4, FTE = ".50", SupevisorID = 25 WHERE ID = 1137" 


Data Source = "SLL_STAFF" 



The error occurred while processing an element with a general identifier
of (CFQUERY), occupying document position (9:2) to (9:66).


Date/Time: 03/10/03 13:06:54
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.0.3705)
Remote Address: 163.153.8.144
HTTP Referrer:
http://admin.sllboces.org/tools/staff_directory.cfm?id=1137
Query String: a=update&id=1137

 
With this code:
 
 <cfquery name="InsertStaff" datasource="SLL_Staff" dbtype="ODBC">
 UPDATE Staff
 SET LastName = "#form.lname#", 
  FirstName = "#form.fname#", 
  Building = "#form.bldg#", 
  DeptCode = "#form.dept#", 
  Job = "#form.job#", 
  Extension = #form.ext#, 
  [Alternate Phone] = #form.aphone#,
  [Alt  Extension] = #form.aext#, 
  Email = "#form.email#", 
  GroupCode = #form.group#, 
  FTE = "#form.fte#", 
  SupevisorID = #form.sup#
 WHERE ID = #URL.id#
 </cfquery>
 
Can someone tell me what I'm doing wrong?  I know all the fields are
correct, and the FORM requests are too...
 
Thanks,
 
Scott

Scott Wilhelm
Computer Technician/Web Developer
http://www.sllboces.org <http://www.sllboces.org/> 
[EMAIL PROTECTED]

Canton (Mon/Tue)
St. Lawrence-Lewis BOCES
PO Box 231, 139 State Street Road
Canton, NY 13617
P.   315-386-4504 x 164
F.   315-386-3395

Heuvelton (Wed/Thu/Fri)
Heuvelton Central School
PO Box 375, 87 Washington Street
Heuvelton, NY 13654
P.   315-344-2414 x 3651<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />

 
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to