Question

I'm having a problem with a recent database crash. After recovering the data, I now get some odd parse errors, but it isn't clear if it is in the data, or if it something else. See the attached image, but it is from a form submit that cfupdate is storing data to table.

There is an input button called "next" in the form and that content gets saved to the DB.

So I have the following question:

  1. Is there a way to see what the SQL Query is and where that error occurred?
  2. Any clues or hints to why I'm getting this error?
  3. Any way to see more information that might help? Debug mode?

This is running on ColdFusion MX7 with MS Access Database.

The error:

Error Executing Database Query.

Syntax error: Stopped parse at NEXT

The error occurred in \\******\scholardetails2_en.cfm: line 19
17 : <!--- if coming from page1, save data to database and renew session.txtEmail --->
18 : <cfif IsDefined("Form.txtFirstName")>
19 :    <cfupdate dataSource="****" tableName="tblApplications">
20 :    <!--- <cfset Session.txtEmail=Form.txtEmail> --->
21 :    <!--- <cfset Session.language=Form.language> --->
SQL   update tblApplications set TXTDOB= (param 1) 
,TXTPFIRSTNAME= (param 2) ,TXTPOB= (param 3) 
,TXTFLYNAME= (param 4) ,TXTOFFNAME= (param 5) 
,TXTOFFCITY= (param 6) ,TXTFIRSTNAME= (param 7) 
,TXTPROVINCE= (param 8) ,TXTOFFPCODE= (param 9) 
,TXTGRANTS= (param 10) ,TXTEMPID= (param 11) 
,RDOGENDER= (param 12) ,CBOCOUNTRY= (param 13) 
,TXTSTADR2= (param 14) ,TXTPFLYNAME= (param 15) 
,TXTTELNO= (param 16) ,LANGUAGE= (param 17) 
,TXTOFFSTREET2= (param 18) ,TXTOFFSTREET3= (param 19) 
,TXTPOSITION= (param 20) ,TXTCITY= (param 21) 
,CBOOFFCOUNTRY= (param 22) ,TXTSTADR1= (param 23) 
,TXTPMIDNAME= (param 24) ,NEXT= (param 25) 
,TXTDEPT= (param 26) ,TXTPCODE= (param 27) 
,TXTPPHONE= (param 28) ,TXTMIDNAME= (param 29) 
,TXTOFFSTREET1= (param 30) ,CBOCOC= (param 31) ,TXTOFFPROVINCE= (param 32) 
,TXTSTADR3= (param 33) ,TXTPEMAIL= (param 34) 

where txtEmail= (param 35)
DATASOURCE    ****
VENDORERRORCODE   172032
SQLSTATE      2A000
Was it helpful?

Solution

My personal recommendation would be to replace that cfupdate statement with comparable cfquery. Any error information you get is going to be shrouded by the architecture of the cfupdate tag.

If you really feel married to the original code, you could add a formfields attribute to the cfupdate tag and omit the "next" field from the list of columns to update.

<cfupdate datasource="***" tableName="tblApplications" 
formFields="txtpfirstname,txtpmidname,txtplastname,txtdob,txtpob,..." />

My first guess would be that the content of the "next" form field is too long for that table column, but if you remove it from the list of updated columns, that will tell you where the error is actually occurring. If after removing the "next" column, you get an error on "txtdept" then you'll know that the error is actually occurring on "txtpmidname" (and my guess would still be the value is too long).

Dan is correct that you can find information about the server (version number, etc) in the server scope. A Railo or BlueDragon server will have an extra structure, but like Dan mentioned, that won't tell you anything about the database drivers. That information is in the ColdFusion Administrator if it's anywhere, but imo it's unlikely that seeing the driver versions will shed any light on the problem. All of this brings me back to my original suggestion: replace the cfupdate tag with a cfquery - that's the fastest, simplest solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top