Ask a Question related to Coldfusion Database Access, Design and Development.
-
bigbrain28 #1
Cfquery Update Syntax Suddenly bad???
The following code has been working for 2yrs or so;
And suddenly I get the following error;
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Syntax error in UPDATE statement.
The error occurred in C:\Inetpub\wwwroot\seaboard\CartweaverPO.cfm: line 61
Called from C:\Inetpub\wwwroot\seaboard\ProcessOrder.cfm: line 36
Called from C:\Inetpub\wwwroot\seaboard\CartweaverPO.cfm: line 61
Called from C:\Inetpub\wwwroot\seaboard\ProcessOrder.cfm: line 36
59 : ,howUheard='#form.howUheard#'
60 : ,'mailCheck='#form.mailCheck#'
61 : WHERE CustomerID=#form.CustomerID#;
62 : </cfquery>
63 : </cfif>
SQL UPDATE Customers SET CompanyName = 'The Visual Spectrum' ,FirstName =
'Henry' ,LastName = 'Silvia' ,Address1 = '4432 Commercial Way' ,Address2 = ''
,City = 'Spring Hill' ,StateOrProv = 'FL' ,Zip = '34608' ,Country = 'United
States' ,ShpAddress1 = '14567 Hoobi Doobi Lane' ,ShpCity = 'Brooksville'
,ShpStateOrProv = 'FL' ,ShpZip = '34606' ,ShpCountry = 'United States'
,PhoneNumber = '352-597-4395' ,FaxNumber = '597-5991' ,EmailAddress =
'hgs@visualspectrum.com' ,Notes = '' ,CCardType = 'v' ,CCNumber =
'411111111111' ,ExprMonth = '01' ,ExprYr = '2008' ,permission = 'no'
,poNumber='' ,howUheard='Customer did not answer' ,'mailCheck='no' WHERE
CustomerID=2201;
Every line has a comma except the last. The WHERE does referrence a ID field
(Number, MSAccess) and yet I get Syntax error with no clue what is
syntactically wrong. Any clues?
<cfquery name="updateCust" datasource="SeaboardCart" dbtype="odbc">
UPDATE Customers
SET CompanyName = '#form.CompanyName#'
,FirstName = '#form.FirstName#'
,LastName = '#form.LastName#'
,Address1 = '#form.Address1#'
,Address2 = '#form.Address2#'
,City = '#form.City#'
,StateOrProv = '#form.StateOrProv#'
,Zip = '#form.Zip#'
,Country = '#form.Country#'
,ShpAddress1 = '#form.ShpAddress1#'
,ShpCity = '#form.ShpCity#'
,ShpStateOrProv = '#form.ShpStateOrProv#'
,ShpZip = '#form.ShpZip#'
,ShpCountry = '#form.ShpCountry#'
,PhoneNumber = '#form.PhoneNumber#'
,FaxNumber = '#form.FaxNumber#'
,EmailAddress = '#form.EmailAddress#'
,Notes = '#form.Notes#'
,CCardType = '#form.CCardType#'
,CCNumber = '#form.CCNumber#'
,ExprMonth = '#form.ExprMonth#'
,ExprYr = '#form.ExprYr#'
,permission = '#form.permission#'
,poNumber='#form.poNumber#'
,howUheard='#form.howUheard#'
,'mailCheck='#form.mailCheck#'
WHERE CustomerID=#form.CustomerID#;
</cfquery>
bigbrain28 Guest
-
MS Access UPDATE not updating with cfquery
Three columns will update (GolaCalls, GoalContacts, and GoalAppts). However, the two columns FirstName and LastName remain unchanged even if there... -
Results of update in CFQUERY
And what about delete? Seems like delete does not return anything neither. -
Error executing a cfquery update statement. PLEASE HELP
I have been over and over this. I am trying to update a simple table. I took this script from the same server using a different DSN. I keep... -
<cfquery> syntax problem
Guys can someone tell me whats wrong with the line I have put in bold? Im trying to run this query but I get an error telling me the syntax is wrong... -
Update syntax
Hi Please excuse if repeat question. Is it possible using dreamweavers 'Update Recordset' server behaviour to access the mysql syntax, in... -
philh #2
Re: Cfquery Update Syntax Suddenly bad???
Hi bigbrain28,
howUheard='Customer did not answer' ,'mailCheck='no' WHERE
How did that comma get before the mailCheck field?
philh Guest
-
bigbrain28 #3
Re: Cfquery Update Syntax Suddenly bad???
WOW, Eagle-Eye-Phil! Thanks man! I looked at that code 'til I was cross-eyed and never saw that extra quote. I wonder where that came from??? Well, It works now, so thanks.
bigbrain28 Guest



Reply With Quote

