1 Replies - 3364 Views - Last Post: 30 December 2008 - 08:28 PM Rate Topic: -----

#1 terrymod   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 30-December 08

CF insert/ update errors into MYSQL

Post icon  Posted 30 December 2008 - 04:06 PM

Code:
<cfinsert DATASOURCE="#application.ds#" TABLENAME="project_specs"> or
<cfupdate DATASOURCE="#application.ds#" TABLENAME="project_specs">

Error: Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION,PROJECTID,SPECNO,PRODUCTID,ALLOWANCE,PROJCATEGORYID,QTY,SPECIFICATION,SAL' at line 1


SQLSTATE 42000
SQL insert into project_specs (OPTION,PROJECTID,SPECNO,PRODUCTID,ALLOWANCE,PROJCATEGORYID,QTY,SPECIFICATION,SALEPRICE,SPECTITLE,PLANLISTID) values ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) , (param 11) )
VENDORERRORCODE 1064
DATASOURCE homecrafters

Using CF 8 / windows server 2003
I transferred the data base from Access into MYSQL 5.0 and there are 4 tables acting like this - I have tried to look up the table structure in MYSQL and see if there is something there.

CFINSERT / CFUPDATES work in other tables.

Get same error when trying to delete from a table, yet I dont get it when I delete in a different table.

Many thanks for you replies.
Terrymod

Is This A Good Question/Topic? 0
  • +

Replies To: CF insert/ update errors into MYSQL

#2 sansclue   User is offline

  • D.I.C Regular

Reputation: 29
  • View blog
  • Posts: 316
  • Joined: 21-November 07

Re: CF insert/ update errors into MYSQL

Posted 30 December 2008 - 08:28 PM

View Postterrymod, on 30 Dec, 2008 - 03:06 PM, said:

Code:
Error: Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION,PROJECTID,SPECNO,PRODUCTID,ALLOWANCE,PROJCATEGORYID,QTY,SPECIFICATION,SAL' at line 1


The MYSQL documentation lists that as a parse error. Probably caused by using a reserved word (like OPTION) as an object name. If that is the case, the best option is to do a rename.

Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR)
http://dev.mysql.com...rved-words.html
http://dev.mysql.com...ges-server.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1