Weird "undefined in form" error message: but is defined--can anyone help?

Here is the <form> code:
<!---Dynamically generated list of bowling center names--->
<cfselect class="selectBox" name="regHomeCntr">
<option selected="selected">Where is your home bowling center?</option>
<cfloop query="getBowlCenters">
<option value="#getBowlCenters.ctrName#">#getBowlCenters.ctrName#</option>
</cfloop>
the <cfform> passes the above info to template (below) for insertion into DB. Everything processes successfully (as can be seen by the variable table at the top of the web page). Even the name of the bowling center is passed as a variable to the processing page, but CF keeps telling me the variable is undefined although I can see that it has passed the variable to the next page. I thought it was because I had the <CFSELECT> wrong, but the variable is being passed no matter what is selected. I am stumped.
Here is the code that is crashing:
<cfquery name="getTournaments" datasource="#dbs#">
    SELECT *
    FROM tournamentFeatures
    WHERE tName = '#URL.tName#'
</cfquery>
<table>
<tr>
<td><strong>Variable Name</strong></td>
    <td><strong>Value</strong></td>
</tr>
<!--- Loops over the URL structure and outputs variable names and associated values --->
<cfloop collection="#URL#" item="VarName">
<cfoutput>
<tr>
<td>
    #VarName#</td>
    <td> #URL[VarName]#</td>
</tr>
</cfoutput>
</cfloop>
</table>
<p></p>
<table>
<tr>
<td><strong>Variable Name</strong></td>
    <td><strong>Value</strong></td>
</tr>
<!--- Loops over the FORM structure and outputs variable names and associated values --->
<cfloop collection="#form#" item="VarName">
<cfoutput>
<tr>
<td>
    #VarName#</td>
    <td> #form[VarName]#</td>
</tr>
</cfoutput>
</cfloop>
</table>
<!---Inserts new tournament registration into the registration table--->
<cflock name="addRegistrationRecord" type="exclusive" timeout="20">
<cftransaction>
<cfquery name="insertRegistration" datasource="RBDS">
INSERT INTO
     tournamentReg
SET
    tName = #URL.tName#,
     tDate = '#URL.tDate#'
     regDateTime = '#URL.regDateTime#',
     regNumber = '#URL.regNumber#'
     regFName = '#form.regFName#',
     regLName = '#form.regLName#',
     streetAddr = '#form.streetAddr#',
     cityStateZip = '#form.CityStateZip#',
     regPhone = '#form.regPhone#',
     regEmail = '#form.regEmail#',
     lastBook = '#form.lastBook#',
     usbcCard = '#form.usbcCard#',
        <cfif tName EQ #URL.tname# AND 'doubles' IS 'yes'>
          bowlWith2 = '#form.bowlWith2#',
        <cfelseif tName EQ #URL.tname# AND 'threePerTeam' is 'yes'>
          bowlWith3 = '#form.bowlWith3#',
        <cfelseif tName EQ #URL.tname# AND 'fourPerTeam' IS 'yes'>
          bowlWith4 = '#form.bowlWith4#',
        <cfelseif tName EQ #URL.tname# AND 'fivePerTeam' IS 'yes'>
          bowlWith5 = '#form.bowlWith5#',
        <cfelse>
          singlesTournament = '#form.singlesTournament#'
        </cfif>
          regHomeCntr = '#form.ctrName#'      (CRASHES HERE)
WHERE
     tName = '#URL.tName#' AND tDate = '#URL.tDate#'
</cfquery>
Try the code for yourself on a live site to see what I mean.
Go here first: http://www.renobowls.com/tournaments.cfm, then click on the button to the right of Test 2. You don't have to fill in any of the text areas but select one of the Bowling Centers from the drop down box. Then click "Register Me." You will see all the variables passed by the form at the top of the page...INCLUDING the Bowling Center you just selected from the drop down box on the previous page. How can it be passing the variable yet the query (insertRegistration) states it is not defined!!! UHGRRRR...

Well...hmmm. This is a new one on me. Used to be so easy. What happened? I made the necessary changes but I am getting a totally new error message. I have checked the number of query fields against DB...all checks. Did the same in my queries (unless I am missing something). It states that I have a syntax error. Where? What? I cannot for the life of me see it. But then again we know how that works...looking at the same code all day. Here is what I start with:
<cfquery name="addRegistration" datasource="RBDS">
INSERT INTO
tournamentReg
        (tDate, tName, regDateTime, regNumber, regFName, regLName, streetAddr, cityStateZip,
        regPhone, regEmail, lastBook, usbcCard, regNotify, regReturn, regMembership,
        regLeague, ctrName,
        <cfif tName EQ #URL.tName# AND 'doubles' IS 'yes'>
        BowlerTwoName, BowlerTwoBook,
        <cfelseif tName EQ #URL.tname# AND 'threePerTeam' is 'yes'>
        BowlerTwoName, BowlerTwoBook,
        BowlerThreeName, BowlerThreeBook,
        <cfelseif tName EQ #URL.tname# AND 'fourPerTeam' IS 'yes'>
        BowlerTwoName, BowlerTwoBook,
        BowlerThreeName, BowlerThreeBook,       
        BowlerFourName, BowlerFourBook,
        <cfelseif tName EQ #URL.tname# AND 'fivePerTeam' IS 'yes'>
        BowlerTwoName, BowlerTwoBook,
        BowlerThreeName, BowlerThreeBook,       
        BowlerFourName, BowlerFourBook,
        BowlerFiveName, BowlerFiveBook)
        <cfelse>
        singles,  )
  </cfif>
    VALUES
            <cfif tName EQ #URL.tname# AND 'doubles' IS 'yes'>
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoBook#">,
            <cfelseif tName EQ #URL.tname# AND 'threePerTeam' is 'yes'>
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeBook#">,
            <cfelseif tName EQ #URL.tname# AND 'fourPerTeam' IS 'yes'>
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFourName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFourBook#">,
            <cfelseif tName EQ #URL.tname# AND 'fivePerTeam' IS 'yes'>
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerTwoBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerThreeBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFourName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFourBook#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFiveName#">,
                 <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.BowlerFiveBook#">,
            <cfelse>
              <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.singles#">,
            </cfif>
        <cfqueryparam cfsqltype="CF_SQL_DATE" value="#URL.tdate#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#URL.tname#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#URL.regDateTime#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#URL.regNumber#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regFName#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regLName#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.streetAddr#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.cityStateZip#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regPhone#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regEmail#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.lastBook#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.usbcCard#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regNotify#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regReturn#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regMembership#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regLeague#">,
            <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.ctrName#">
</cfquery>
Here is what I get:
Variable Name
Value
TNAME
Teusday
REGNUMBER
5219531
TDATE
3/13/10
REGDATETIME
02/16/10 - 7:58:00 PM
Variable Name
Value
CTRNAME
Gold Dust West Bowling Center
REGPHONE
813-0850
REGNOTIFY
Yes
REGEMAIL
[email protected]
REGRETURN
Yes
USBCCARD
8130-5042
REGLEAGUE
No
LASTBOOK
191
REGFNAME
Rick
CITYSTATEZIP
Reno, NV 89523
REGISTER
Register Me
SINGLES
yes
REGNUMBER
9503574
REGMESSAGE
test 7:45PM
FIELDNAMES
REGNUMBER,REGDATETIME,REGFNAME,REGLNAME,REGPHONE,REGEMAIL,CTRNAME,USBCCARD,LASTBOOK,STREET ADDR,CITYSTATEZIP,SINGLES,REGNOTIFY,REGRETURN,REGMEMBERSHIP,REGLEAGUE,REGMESSAGE,REGISTER
STREETADDR
105 N. McCarran Blvd.
REGLNAME
Rossiter
REGMEMBERSHIP
No
REGDATETIME
02/16/10 - 7:44:48 PM
Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
The error occurred in C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 323
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 218
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 217
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 1
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 323
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 218
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 217
Called from C:\Inetpub\wwwroot\renobowls\forms\ProcessRegistration.cfm: line 1
321 :             <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regMembership#">,
322 :             <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.regLeague#">,
323 :             <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.ctrName#">
324 :   )
325 : 
SQL
   INSERT INTO tournamentReg (tDate, tName, regDateTime, regNumber, regFName, regLName, streetAddr, cityStateZip, regPhone, regEmail, lastBook, usbcCard, regNotify, regReturn, regMembership, regLeague, ctrName, singles, ) VALUES ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) , (param 10) , (param 11) , (param 12) , (param 13) , (param 14) , (param 15) , (param 16) , (param 17) , (param 18) )
DATASOURCE
  RBDS
VENDORERRORCODE
  -3502
SQLSTATE
  42000

Similar Messages

Maybe you are looking for

  • Purchasing: Restriction of creation of PO's on the basis of buyer / user

    Hi, We are currently working on a requirement in which the business is expecting to restrict the buyers / users from creating Purchase Orders of some specific GL natural accounts. Is there any functionality using which we can provide lock / check on

  • Loose hinge on 30" ACD

    Hi, I just opened up my brand new 30" ACD. I noticed that the foam packing was broken on one side, indicating that it had been handled a bit roughly in shipping. However, the display seems to be OK. The only problem is the hinge on the stand. My olde

  • SQL Developer 3.1 out of memory

    I new to SQL developer and I been trying to copy data between servers and i run out of memory a lot of times. And i see that it happens with tables with more than 1 mill rec and got clob etc in it. I had to write my own program to handle it and i fou

  • J2sdk and j2re in Mac OS X 10.3

    Dear Developers, I'm quite new to java and need some help. I am a development support staff, and currently doing software adapation to Mac OS X 10.3. The software runs on j2sdk and j2re which are already available in OS X. I need to copy some files t

  • SAX driver property

    Hi All, I am using apache xerces SAX driver in my java application. However, when I start the program I am having to specify the driver property like below java -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser MySAXAppI believe that it is pos