Skip to main content
Inspiring
November 20, 2008
Answered

S.O.S. CF insert error

  • November 20, 2008
  • 3 replies
  • 662 views
HI I get the following error when i add the session field to my insert statement. The session field on the form is populated by a query. The user selects a session from the list and fills out and submits the form. The error below is returned on submit. -thks -- jim

Syntax error in INSERT INTO statement.

The error occurred in C:\DesignSystems\pgs\register_insert.cfm: line 16

15 :
16 : <cfinsert datasource="designSystems" tablename="crabEaglePointTrainingRegistration" formfields="full_name, email, phone, county, session">
17 :
18 :
--

SQL insert into crabEaglePointTrainingRegistration (full_name,email,phone,county,session) values ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) )
DATASOURCE designSystems
VENDORERRORCODE 3092
SQLSTATE  


This topic has been closed for replies.
Correct answer tpkelley
Your session variable is probably conflicting with the session scope. Try renaming the session variable from your form to something else, like mySession.

3 replies

Participating Frequently
November 20, 2008
Also, do you get the error when initially viewing the form or after you submit it?
Participating Frequently
November 20, 2008
Can you post the form & db code again?
tpkelleyCorrect answer
Participating Frequently
November 20, 2008
Your session variable is probably conflicting with the session scope. Try renaming the session variable from your form to something else, like mySession.
rockhikerAuthor
Inspiring
November 20, 2008
changed the session field to mysession in database, form, and action page. Now the form page gives me a variable my session is undefined?