Adobe Dreamweaver Forums



Last 10 THreads :         Image Fade Out/Load new Image/Fade In (Last Post : EWN-CMI - Replies : 0 - Views : 1 )           »          Recommend Reading? (Last Post : anpuofeck - Replies : 5 - Views : 7 )           »          static sound (Last Post : kglad - Replies : 15 - Views : 16 )           »          Detect multiple areas of transparency in an image? (Last Post : Rothrock - Replies : 8 - Views : 9 )           »          Add a full screen button to a video. (Last Post : kglad - Replies : 5 - Views : 9 )           »          Problems when uploading my website (Last Post : speculumcm - Replies : 4 - Views : 5 )           »          Dreamweaver CS3 Download (Last Post : DWFAQ.info - Replies : 5 - Views : 6 )           »          Pop up window using AS3 (Last Post : azilen - Replies : 0 - Views : 1 )           »          flash movie plays prematurely (Last Post : lyshamo - Replies : 5 - Views : 6 )           »          Variable for Loader Content (Last Post : kglad - Replies : 5 - Views : 6 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Cold Fusion > Getting Started
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 07:44 PM
rockhiker
 
Posts: n/a
Diggs:
Default S.O.S. CF insert error

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 &nbsp;




<!--- query to populate form field or register form--->

<cfquery name="qsession" datasource="designSystems">
SELECT *
FROM trainingRegistration
WHERE startdate >=Date()
ORDER BY startdate
</cfquery>

<!---session field code in form--->

<select name="session" id="session" title="session">


<option selected="selected">Select a session</option><cfoutput
query="qsession">
<option value="#session#">#session#</option></cfoutput>
</select>

<!---action page code--->

<cfinsert datasource="designSystems" tablename="trainingRegistration"
formfields="full_name, email, phone, county, session">

<cfoutput>
<p>Thank for registering for the #session#</p> </cfoutput>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 07:54 PM
tpkelley
 
Posts: n/a
Diggs:
Default Re: S.O.S. CF insert error

Your session variable is probably conflicting with the session scope. Try renaming the session variable from your form to something else, like mySession.
Reply With Quote
  #3 (permalink)  
Old 11-20-2008, 08:14 PM
rockhiker
 
Posts: n/a
Diggs:
Default Re: S.O.S. CF insert error

changed the session field to mysession in database, form, and action page. Now the form page gives me a variable my session is undefined?
Reply With Quote


  #4 (permalink)  
Old 11-20-2008, 08:24 PM
tpkelley
 
Posts: n/a
Diggs:
Default Re: S.O.S. CF insert error

Can you post the form & db code again?
Reply With Quote
  #5 (permalink)  
Old 11-20-2008, 08:24 PM
tpkelley
 
Posts: n/a
Diggs:
Default Re: S.O.S. CF insert error

Also, do you get the error when initially viewing the form or after you submit it?
Reply With Quote
  #6 (permalink)  
Old 11-20-2008, 08:34 PM
rockhiker
 
Posts: n/a
Diggs:
Default Re: S.O.S. CF insert error

Thanks for your help.
I forgot to change the field name in the table that populated the session list to mysession.

Jim
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:43 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk