32 Replies Latest reply on May 14, 2013 6:47 AM by Guy Dowd

    Error Executing Database Query.

    Guy Dowd

      Hi I am getting this 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

       

      This is my Code

       

      <cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

      #jobappid#<br>

       

       

      <cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

      </cfoutput>

       

       

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>

       

       

      </CFQUERY>

       

       

       

       

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>

           <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>

           <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>

      )

      </CFQUERY>

      <cfif not #form.company2# is "">

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>

          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>

       

      </CFQUERY>

      </cfif>

      <cfif not #form.company3# is "">

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>

          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>

       

      </CFQUERY>

      </cfif>

      <cfif not #form.company4# is "">

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>

          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>

       

      </CFQUERY>

      </cfif>

      <cfif not #form.company5# is "">

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>

          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>

           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>

       

       

      </CFQUERY>

      </cfif>

       

       

       

       

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>

                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>

       

       

      </CFQUERY>

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>

                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>

      </CFQUERY>

      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                VALUES('#jobappid#')

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>

          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>

                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>

      </CFQUERY>

       

       

      <cfmail to="doug@.com"  from="jobApp@.com" subject=".com Job Application" type="HTML">

                                              <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                        <br>

                                                        <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                        Go to the admin section to review this application.

       

                                                        </cfmail>

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

       

       

      <html>

      <head>

      <link rel="stylesheet" href="style.css">

                <title></title>

      </head>

       

       

      <body>

      <div align="center"><img src="images.gif" alt="" width="135" height="89" border="0"><p><br><br><br>

      <h2>Your Application has been Processed Completely.</h2><br><br>

      <form>

      <input style="background-color: 069;

                border-color: ccc;

                font-family : verdana, Arial, Helvetica, sans-serif;

      font-weight:          bold;

      font-size:          10px;

      color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

      </form></div>

       

       

      </html>

      </body>

       

        • 1. Re: Error Executing Database Query.
          WolfShade Level 4
          INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)
                    VALUES('#jobappid#')
              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>
              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>
              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>
          

           

           

          You insert "jobappid, appdate", but the values you supply are "jobappid, appfirstname".

           

          Also, only jobappid is within the ( and the ) of your VALUES statement.  There are no commas between values.  For all queries.

           

          ^_^

          • 2. Re: Error Executing Database Query.
            Guy Dowd Level 1

            So what you are saying is I should put my query params inside of the ('   ') and place comas between the query params?

            • 3. Re: Error Executing Database Query.
              Guy Dowd Level 1

              So what you are saying is I should put my query params inside of the ('   ') and place comas between the query params?

              • 4. Re: Error Executing Database Query.
                WolfShade Level 4

                Sorry for the delay.  Almost.

                 

                INSERT into tableName(column1,column2,column3)

                VALUES(<cfqueryparam value="#value1#" cfsqltype="cf_sql_varchar">,

                                   <cfqueryparam value="#value2#" cfsqltype="cf_sql_varchar">,

                                   <cfqueryparam value="#value3#" cfsqltype="cf_sql_varchar">)

                 

                When using cfqueryparam, CF will determine the datatype automatically and will use apostrophes when necessary.)

                 

                ^_^

                • 5. Re: Error Executing Database Query.
                  Guy Dowd Level 1


                  I now got this error

                   

                  Error Executing Database Query.

                  Column count doesn't match value count at row 1

                   

                  <cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

                  #jobappid#<br>

                   

                   

                  <cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

                  </cfoutput>

                   

                   

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

                     

                     

                  </CFQUERY>

                   

                   

                   

                   

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                       VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

                   

                   

                  </CFQUERY>

                  <cfif not #form.company2# is "">

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

                      <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

                    

                  </CFQUERY>

                  </cfif>

                  <cfif not #form.company3# is "">

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

                      <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

                     

                  </CFQUERY>

                  </cfif>

                  <cfif not #form.company4# is "">

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

                      <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

                   

                  </CFQUERY>

                  </cfif>

                  <cfif not #form.company5# is "">

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

                      <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

                       <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

                   

                   

                  </CFQUERY>

                  </cfif>

                   

                   

                   

                   

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

                             <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

                   

                   

                  </CFQUERY>

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

                             <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

                  </CFQUERY>

                  <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                            INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                            VALUES('#jobappid#',

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

                             <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

                  </CFQUERY>

                   

                   

                  <cfmail to="doug@"  from="jobApp@" subject=" Job Application" type="HTML">

                                                          <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                                  <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                                    <br>

                                                                    <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                                    Go to the admin section to review this application.

                   

                                                                    </cfmail>

                  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                   

                   

                  <html>

                  <head>

                  <link rel="stylesheet" href="style.css">

                            <title> Job Application Submitted</title>

                  </head>

                   

                   

                  <body>

                  <div align="center"><img src="images/.gif" alt="" width="135" height="89" border="0"><p><br><br><br>

                  <h2>Your Application has been Processed Completely.</h2><br><br>

                  <form>

                  <input style="background-color: 069;

                            border-color: ccc;

                            font-family : verdana, Arial, Helvetica, sans-serif;

                  font-weight:          bold;

                  font-size:          10px;

                  color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

                  </form></div>

                   

                   

                  </html>

                  </body>

                  • 6. Re: Error Executing Database Query.
                    WolfShade Level 4

                    I count 36 columns in the INSERT portion, but only 35 columns of VALUES.  You're short one value.

                     

                    ^_^

                     

                    UPDATE: You're short one VALUE in each query.  Also, I recommend putting the jobappid in cfqueryparam, too.

                    • 7. Re: Error Executing Database Query.
                      Guy Dowd Level 1

                      Was missing appdate. but now I get this error again. stumped

                       

                      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 'leave, supervisor, description) VALUES('dfgf', 'dd', '2004-' at line 1

                       

                       

                      <cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

                      #jobappid#<br>

                       

                       

                      <cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

                      </cfoutput>

                       

                       

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

                                VALUES('#jobappid#','#appdate#',

                         

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

                         

                         

                      </CFQUERY>

                       

                       

                       

                       

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                           VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

                       

                       

                      </CFQUERY>

                      <cfif not #form.company2# is "">

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

                          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

                        

                      </CFQUERY>

                      </cfif>

                      <cfif not #form.company3# is "">

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

                          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

                         

                      </CFQUERY>

                      </cfif>

                      <cfif not #form.company4# is "">

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

                          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

                       

                      </CFQUERY>

                      </cfif>

                      <cfif not #form.company5# is "">

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

                          <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

                           <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

                       

                       

                      </CFQUERY>

                      </cfif>

                       

                       

                       

                       

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

                                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

                       

                       

                      </CFQUERY>

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

                                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

                      </CFQUERY>

                      <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                VALUES('#jobappid#',

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

                                 <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

                      </CFQUERY>

                       

                       

                      <cfmail to="doug@"  from="jobApp@.com" subject=".com Job Application" type="HTML">

                                                              <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                                      <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                                        <br>

                                                                        <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                                        Go to the admin section to review this application.

                       

                                                                        </cfmail>

                      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                       

                       

                      <html>

                      <head>

                      <link rel="stylesheet" href="style.css">

                                <title></title>

                      </head>

                       

                       

                      <body>

                      <div align="center"><img src="images/" alt="" width="135" height="89" border="0"><p><br><br><br>

                      <h2>Your Application has been Processed Completely.</h2><br><br>

                      <form>

                      <input style="background-color: 069;

                                border-color: ccc;

                                font-family : verdana, Arial, Helvetica, sans-serif;

                      font-weight:          bold;

                      font-size:          10px;

                      color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

                      </form></div>

                       

                       

                      </html>

                      </body>

                      • 8. Re: Error Executing Database Query.
                        WolfShade Level 4

                        All of your smaller queries are still mismatched in column count vs value count.

                         

                        The error message is specific to one of the smaller queries.

                         

                        ^_^

                        • 9. Re: Error Executing Database Query.
                          Guy Dowd Level 1

                          I belive i have all the counts equaled up and i still get this

                           

                          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 'leave, supervisor, description) VALUES('MattMay-09-2013', 'sdads',' at line 1

                           

                           

                          <cfoutput><cfset jobappid = '#appfirstname##form.applastname##DateFormat(Now(), "mmm-dd-yyyy")#'>

                          #jobappid#<br>

                           

                           

                          <cfset appdate= '#DateFormat(Now(), "yyyy-mmm-dd")#'>

                          </cfoutput>

                           

                           

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)

                                    VALUES('#jobappid#','#appdate#',

                             

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)

                             

                             

                          </CFQUERY>

                           

                           

                           

                           

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                               VALUES('#jobappid#',

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

                           

                           

                          </CFQUERY>

                          <cfif not #form.company2# is "">

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

                            

                          </CFQUERY>

                          </cfif>

                          <cfif not #form.company3# is "">

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company3#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone3#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate3#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate3#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage3#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage3#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave3#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor3#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description3#"/>)

                             

                          </CFQUERY>

                          </cfif>

                          <cfif not #form.company4# is "">

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company4#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone4#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate4#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate4#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage4#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage4#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave4#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor4#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description4#"/>)

                           

                          </CFQUERY>

                          </cfif>

                          <cfif not #form.company5# is "">

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company5#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone5#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate5#"/>,

                              <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate5#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage5#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage5#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor5#"/>,

                               <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description5#"/>)

                           

                           

                          </CFQUERY>

                          </cfif>

                           

                           

                           

                           

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref1#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress1#"/>,

                                     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone1#"/>)

                           

                           

                          </CFQUERY>

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref2#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress2#"/>,

                                     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone2#"/>)

                          </CFQUERY>

                          <cfquery username='#username#' password='#password#'  datasource='#datasource#'>

                                    INSERT INTO jobappref(jobappid, ref, refaddress, refphone)

                                    VALUES('#jobappid#',

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.ref3#"/>,

                              <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refaddress3#"/>,

                                     <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.refphone3#"/>)

                          </CFQUERY>

                           

                           

                          <cfmail to="doug@"  from="jobApp@" subject=" Job Application" type="HTML">

                                                                  <font face="Verdana,Geneva,Arial,Helvetica,sans-serif" size="-1"><strong>

                                          <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/><cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>          </strong> has applied for a position:<br>

                                                                            <br>

                                                                            <b>Date Applied: </b><cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.appdate#"/><br>

                                                                            Go to the admin section to review this application.

                           

                                                                            </cfmail>

                          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                           

                           

                          <html>

                          <head>

                          <link rel="stylesheet" href="style.css">

                                    <title>ob Application Submitted</title>

                          </head>

                           

                           

                          <body>

                          <div align="center"><img src="images" alt="" width="135" height="89" border="0"><p><br><br><br>

                          <h2>Your Application has been Processed Completely.</h2><br><br>

                          <form>

                          <input style="background-color: 069;

                                    border-color: ccc;

                                    font-family : verdana, Arial, Helvetica, sans-serif;

                          font-weight:          bold;

                          font-size:          10px;

                          color: #fff;" type=button value="Close This Window" onClick="javascript:window.close();">

                          </form></div>

                           

                           

                          </html>

                          </body>

                          • 10. Re: Error Executing Database Query.
                            Reed Powell Level 3

                            Nothing jumps out at me, so if i were debugging this I'd start by putting in a cfdump of the form data at the top, to see what the data looks like, and also put some sort of message after each of the cfif statements so that I could see which block of code it is in when it throws that error.  BTW, you don't need those hash marks around the form var name in the CFIFs.

                            -reed

                            • 11. Re: Error Executing Database Query.
                              WolfShade Level 4

                              Yeah.. might be a stray apostrophe, or something else breaking the string delimiting.  Of course CFDUMP would also give you which LINE the error is on.

                               

                              ^_^

                              • 12. Re: Error Executing Database Query.
                                Guy Dowd Level 1

                                I am not sure i did the dump right but i put <cfdump at the begining and the > at the end of my code and got this.

                                 

                                 

                                Invalid token c found on line 3 at column 2.

                                The CFML compiler was processing:

                                • A cfdump tag beginning on line 1, column 2.
                                • 13. Re: Error Executing Database Query.
                                  WolfShade Level 4

                                  No.  Just curious.. how long have you been coding CF??

                                   

                                  <cfdump var="#form#" expand="yes" /> <cfabort> at the top of the page will dump the form variables and stop the page from processing, giving you a look at the form data.

                                   

                                  If you put everything in between <cftry> and <cfcatch><cfdump var="#cfcatch#"></cfcatch></cftry> then you'll get more detailed error messages.

                                   

                                  ^_^

                                  • 14. Re: Error Executing Database Query.
                                    Guy Dowd Level 1

                                    Not very long. I am a designer and got this dumped in my lap gotta work my way through it.

                                    • 15. Re: Error Executing Database Query.
                                      Guy Dowd Level 1

                                      This is what i got

                                       

                                      struct
                                      APPCITYgfg
                                      APPFIRSTNAMEdfg
                                      APPLASTNAMEdfg
                                      APPMIDDLENAMEdfg
                                      APPPHONEgdf
                                      APPPOSITIONdfgf
                                      APPSTATEWI
                                      APPSTREETfdg
                                      APPZIPgfdfd
                                      AVAILABLEfdsfd
                                      BUSPHONE1sdf
                                      BUSPHONE2[empty string]
                                      BUSPHONE3[empty string]
                                      BUSPHONE4[empty string]
                                      BUSPHONE5[empty string]
                                      COLLEGEADDRES[empty string]
                                      COLLEGEDIPLOMA[empty string]
                                      COLLEGEGRADNo
                                      COLLEGESUBJECTS[empty string]
                                      COLLEGEYEARS[empty string]
                                      COMPANY1sdfsd
                                      COMPANY2[empty string]
                                      COMPANY3[empty string]
                                      COMPANY4[empty string]
                                      COMPANY5[empty string]
                                      CRIMEYes
                                      DESCRIPTION1Description of Duties:fsdf
                                      DESCRIPTION2Description of Duties:
                                      DESCRIPTION3Description of Duties:
                                      DESCRIPTION4Description of Duties:
                                      DESCRIPTION5Description of Duties:
                                      EIGHTEENYes
                                      EMPFROMDATE112/2004
                                      EMPFROMDATE2[empty string]
                                      EMPFROMDATE3[empty string]
                                      EMPFROMDATE4[empty string]
                                      EMPFROMDATE5[empty string]
                                      EMPTODATE112/2005
                                      EMPTODATE2[empty string]
                                      EMPTODATE3[empty string]
                                      EMPTODATE4[empty string]
                                      EMPTODATE5[empty string]
                                      ENDWAGE115
                                      ENDWAGE2[empty string]
                                      ENDWAGE3[empty string]
                                      ENDWAGE4[empty string]
                                      ENDWAGE5[empty string]
                                      EXPERIENCESsdffsd
                                      FIELDNAMESAPPFIRSTNAME,APPMIDDLENAME,APPLASTNAME,APPPHONE,APPSTREET,APPCITY,APPSTATE,APPZIP,FULLTIME ,EIGHTEEN,APPPOSITION,PREVIOUS,PREVIOUSDATE,AVAILABLE,EXPERIENCES,CRIME,COMPANY1,EMPFROMDA TE1,EMPTODATE1,STARTWAGE1,ENDWAGE1,LEAVE1,SUPERVISOR1,DESCRIPTION1,BUSPHONE1,COMPANY2,EMPF ROMDATE2,EMPTODATE2,STARTWAGE2,ENDWAGE2,LEAVE2,SUPERVISOR2,DESCRIPTION2,BUSPHONE2,COMPANY3 ,EMPFROMDATE3,EMPTODATE3,STARTWAGE3,ENDWAGE3,LEAVE3,SUPERVISOR3,DESCRIPTION3,BUSPHONE3,COM PANY4,EMPFROMDATE4,EMPTODATE4,STARTWAGE4,ENDWAGE4,LEAVE4,SUPERVISOR4,DESCRIPTION4,BUSPHONE 4,COMPANY5,EMPFROMDATE5,EMPTODATE5,STARTWAGE5,ENDWAGE5,LEAVE5,SUPERVISOR5,DESCRIPTION5,BUS PHONE5,HSADDRES,HSSUBJECTS,HSYEARS,HSGRAD,HSDIPLOMA,COLLEGEADDRES,COLLEGESUBJECTS,COLLEGEY EARS,COLLEGEGRAD,COLLEGEDIPLOMA,TECHADDRES,TECHSUBJECTS,TECHYEARS,TECHGRAD,TECHDIPLOMA,REF 1,REFADDRESS1,REFPHONE1,REF2,REFADDRESS2,REFPHONE2,REF3,REFADDRESS3,REFPHONE3,Q1,Q2,Q3
                                      FULLTIMEYes
                                      HSADDRES[empty string]
                                      HSDIPLOMA[empty string]
                                      HSGRADNo
                                      HSSUBJECTS[empty string]
                                      HSYEARS[empty string]
                                      LEAVE1dfsf
                                      LEAVE2[empty string]
                                      LEAVE3[empty string]
                                      LEAVE4[empty string]
                                      LEAVE5[empty string]
                                      PREVIOUSYes
                                      PREVIOUSDATE2001
                                      Q1Yes
                                      Q2Yes
                                      Q3Yes
                                      REF1[empty string]
                                      REF2[empty string]
                                      REF3[empty string]
                                      REFADDRESS1[empty string]
                                      REFADDRESS2[empty string]
                                      REFADDRESS3[empty string]
                                      REFPHONE1[empty string]
                                      REFPHONE2[empty string]
                                      REFPHONE3[empty string]
                                      STARTWAGE115
                                      STARTWAGE2[empty string]
                                      STARTWAGE3[empty string]
                                      STARTWAGE4[empty string]
                                      STARTWAGE5[empty string]
                                      SUPERVISOR1ef
                                      SUPERVISOR2[empty string]
                                      SUPERVISOR3[empty string]
                                      SUPERVISOR4[empty string]
                                      SUPERVISOR5[empty string]
                                      TECHADDRES[empty string]
                                      TECHDIPLOMA[empty string]
                                      TECHGRADNo
                                      TECHSUBJECTS[empty string]
                                      TECHYEARS[empty string]
                                      • 16. Re: Error Executing Database Query.
                                        WolfShade Level 4

                                        I don't have time to go through everything.  Does it look, to you, as if everything is there?

                                         

                                        Next, try my second suggestion regarding cftry/cfcatch (after you remove the code from my first suggestion) and run the page.  See if the cfcatch provides details that have thus far been lacking.

                                         

                                        ^_^

                                        • 17. Re: Error Executing Database Query.
                                          Guy Dowd Level 1

                                          So put <cftry><cfcatch><cfdump var="#cfcatch#"> at the beginning of my page and </cfcatch></cftry> at the very end?

                                          • 18. Re: Error Executing Database Query.
                                            WolfShade Level 4

                                            Close. 

                                             

                                            <cftry>

                                             

                                            your stuff

                                             

                                            <cfcatch><cfdump var="#cfcatch#"></cfcatch>

                                            <cftry>

                                             

                                            ^_^

                                            • 19. Re: Error Executing Database Query.
                                              Guy Dowd Level 1

                                              There is alot here and nto sure what get from this but it shows my error and what not.

                                               


                                              sdsasdMay-09-2013
                                              struct
                                              Cause
                                              struct
                                              ErrorCode1064
                                              MessageYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1
                                              SQLState42000
                                              StackTracecom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1021) at coldfusion.server.j2ee.sql.JRunPreparedStatement.execute(JRunPreparedStatement.java:91) at coldfusion.sql.Executive.executeQuery(Executive.java:1245) at coldfusion.sql.Executive.executeQuery(Executive.java:1008) at coldfusion.sql.Executive.executeQuery(Executive.java:939) at coldfusion.sql.SqlImpl.execute(SqlImpl.java:341) at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:843) at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:533) at cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123) at cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1) at cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
                                              TagContext
                                              array
                                              1
                                              struct
                                              COLUMN0
                                              IDCFQUERY
                                              LINE123
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              2
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              3
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              4
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE86
                                              RAW_TRACEat cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86)
                                              TEMPLATEE:\InetPub\imperialind\content.cfm
                                              TYPECFML
                                              5
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE225
                                              RAW_TRACEat cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225)
                                              TEMPLATEE:\InetPub\imperialind\index-old.cfm
                                              TYPECFML
                                              Typecom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
                                              DataSourceimperial
                                              DetailYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1
                                              ErrorCode42000
                                              MessageError Executing Database Query.
                                              NativeErrorCode1064
                                              RootCause
                                              struct
                                              ErrorCode1064
                                              MessageYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1
                                              SQLState42000
                                              StackTracecom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1021) at coldfusion.server.j2ee.sql.JRunPreparedStatement.execute(JRunPreparedStatement.java:91) at coldfusion.sql.Executive.executeQuery(Executive.java:1245) at coldfusion.sql.Executive.executeQuery(Executive.java:1008) at coldfusion.sql.Executive.executeQuery(Executive.java:939) at coldfusion.sql.SqlImpl.execute(SqlImpl.java:341) at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:843) at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:533) at cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123) at cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1) at cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
                                              TagContext
                                              array
                                              1
                                              struct
                                              COLUMN0
                                              IDCFQUERY
                                              LINE123
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              2
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              3
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              4
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE86
                                              RAW_TRACEat cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86)
                                              TEMPLATEE:\InetPub\imperialind\content.cfm
                                              TYPECFML
                                              5
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE225
                                              RAW_TRACEat cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225)
                                              TEMPLATEE:\InetPub\imperialind\index-old.cfm
                                              TYPECFML
                                              Typecom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
                                              SQLState42000
                                              SqlINSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description) VALUES('sdsasdMay-09-2013', (param 1) , (param 2) , (param 3) , (param 4) , (param 5) , (param 6) , (param 7) , (param 8) , (param 9) )
                                              StackTracecoldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query. at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:595) at cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123) at cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1) at cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1021) at coldfusion.server.j2ee.sql.JRunPreparedStatement.execute(JRunPreparedStatement.java:91) at coldfusion.sql.Executive.executeQuery(Executive.java:1245) at coldfusion.sql.Executive.executeQuery(Executive.java:1008) at coldfusion.sql.Executive.executeQuery(Executive.java:939) at coldfusion.sql.SqlImpl.execute(SqlImpl.java:341) at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:843) at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:533) ... 42 more
                                              TagContext
                                              array
                                              1
                                              struct
                                              COLUMN0
                                              IDCFQUERY
                                              LINE123
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor15(E:\InetPub\imperialind\includes\jobapp_process.c fm:123)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              2
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273._factor17(E:\InetPub\imperialind\includes\jobapp_process.c fm:1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              3
                                              struct
                                              COLUMN0
                                              IDCF_JOBAPP_PROCESS
                                              LINE1
                                              RAW_TRACEat cfjobapp_process2ecfm454558273.runPage(E:\InetPub\imperialind\includes\jobapp_process.cfm :1)
                                              TEMPLATEE:\InetPub\imperialind\includes\jobapp_process.cfm
                                              TYPECFML
                                              4
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE86
                                              RAW_TRACEat cfcontent2ecfm1009021074.runPage(E:\InetPub\imperialind\content.cfm:86)
                                              TEMPLATEE:\InetPub\imperialind\content.cfm
                                              TYPECFML
                                              5
                                              struct
                                              COLUMN0
                                              IDCFINCLUDE
                                              LINE225
                                              RAW_TRACEat cfindex2dold2ecfm2038289319.runPage(E:\InetPub\imperialind\index-old.cfm:225)
                                              TEMPLATEE:\InetPub\imperialind\index-old.cfm
                                              TYPECFML
                                              TypeDatabase
                                              queryErrorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave, supervisor, description) VALUES('sdsasdMay-09-2013', '', ' at line 1
                                              where(param 1) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 2) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 3) = [type='IN', value='null', sqltype='cf_sql_date'] , (param 4) = [type='IN', value='null', sqltype='cf_sql_date'] , (param 5) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 6) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 7) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 8) = [type='IN', class='java.lang.String', value='', sqltype='cf_sql_varchar'] , (param 9) = [type='IN', class='java.lang.String', value='Description of Duties:', sqltype='cf_sql_varchar']
                                              • 20. Re: Error Executing Database Query.
                                                Guy Dowd Level 1

                                                I seem to be missign the emplyment history where all teh query params are

                                                • 21. Re: Error Executing Database Query.
                                                  WolfShade Level 4

                                                  jobapp_process.cfm, line 123, appears to be the issue.

                                                   

                                                  ^_^

                                                  • 22. Re: Error Executing Database Query.
                                                    Guy Dowd Level 1

                                                    so this line?

                                                     

                                                     

                                                    <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave5#"/>,

                                                    • 23. Re: Error Executing Database Query.
                                                      WolfShade Level 4

                                                      If that line is line 123 of jobapp_process.cfm, yes.  I didn't see anything wrong in the form data from the CFDUMP.  Must be something else.

                                                       

                                                      ^_^

                                                      • 24. Re: Error Executing Database Query.
                                                        Guy Dowd Level 1

                                                        I think it has to do with this set of line becuase of the error but i dont know what. Is there a better way to write this?

                                                         

                                                         

                                                         

                                                        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 'leave, supervisor, description) VALUES('MattMay-09-2013', 'sdads',' at line 1

                                                         

                                                        <cfquery username='#username#' password='#password#'  datasource='#datasource#'>
                                                        INSERT INTO jobapp(jobappid, appdate, applastname, appfirstname, appmiddlename, appphone, appstreet, appcity, appstate, appzip, fulltime, eighteen, appposition, previous, previousdate, available, experiences, crime, hsaddres, hssubjects, hsyears, hsgrad, hsdiploma, collegeaddres, collegesubjects, collegeyears, collegegrad, collegediploma, techaddres, techsubjects, techyears, techgrad , techdiploma, q1, q2, q3)
                                                        VALUES('#jobappid#','#appdate#',

                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appfirstname#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appmiddlename#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.applastname#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appphone#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstreet#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appcity#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appstate#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appzip#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.fulltime#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.eighteen#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.appposition#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previous#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.previousdate#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.available#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.experiences#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.crime#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsaddres#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hssubjects#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsyears#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsgrad#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.hsdiploma#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeaddres#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegesubjects#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegeyears#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegegrad#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.collegediploma#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techaddres#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techsubjects#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techyears#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techgrad#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.techdiploma#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q1#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q2#"/>,
                                                        <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.q3#"/>)


                                                        </CFQUERY>

                                                        • 25. Re: Error Executing Database Query.
                                                          WolfShade Level 4

                                                          From a cursory glance, this portion of code is not an issue, other than jobappid and appdate not being in cfqueryparam tags.

                                                           

                                                          The issue is specifically with the fifth iteration of company, the portion of the form for LEAVE.  According to the CFDUMP of the catch error message.

                                                           

                                                          ^_^

                                                          • 26. Re: Error Executing Database Query.
                                                            Guy Dowd Level 1

                                                            Is there suppose to be something in the " " in my cfifs?

                                                             

                                                            Do i need a cfif on the company1?

                                                             

                                                             

                                                             

                                                            <cfquery username='#username#' password='#password#'  datasource='#datasource#'>
                                                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)
                                                            VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#jobappid#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.empfromdate1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.emptodate1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor1#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description1#"/>)

                                                            </CFQUERY>

                                                            <cfif not #form.company2# is "">
                                                            <cfquery username='#username#' password='#password#'  datasource='#datasource#'>
                                                            INSERT INTO jobappemp(jobappid, company, busphone, empfromdate, emptodate, startwage, endwage, leave, supervisor, description)
                                                            VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#jobappid#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.company2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.busphone2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employfromdate2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_date" VALUE="#form.employtodate2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.startwage2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.endwage2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.leave2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.supervisor2#"/>,
                                                            <cfqueryparam cfsqltype="cf_sql_varchar" VALUE="#form.description2#"/>)

                                                            </CFQUERY>
                                                            </cfif>

                                                            • 27. Re: Error Executing Database Query.
                                                              Guy Dowd Level 1

                                                              Still found  no resolution. FYI not sure if i told you this prior this ran just fine prior to my host updating CFM and MYSQL

                                                              • 28. Re: Error Executing Database Query.
                                                                WolfShade Level 4

                                                                Since the variable is not in a string, you don't need the hashmarks.

                                                                 

                                                                <cfif len(trim(form.company2)) neq 0> will do a better job of checking to see if company2 has value.

                                                                 

                                                                But that still isn't what's causing your issue.  Something is wrong with the fifth company "leave" value.  Does it contain an apostrophe?

                                                                 

                                                                ^_^

                                                                • 29. Re: Error Executing Database Query.
                                                                  Guy Dowd Level 1

                                                                  I do not see an apostrophe... I also added e to the end of leave, supevisoor and description to make sure they are the same and still get an error.

                                                                  • 30. Re: Error Executing Database Query.
                                                                    WolfShade Level 4

                                                                    I'm out of answers.  There is most likely something breaking the string for that fifth "leave" value.  I just can't figure out what it is.

                                                                     

                                                                    ^_^

                                                                    • 31. Re: Error Executing Database Query.
                                                                      Guy Dowd Level 1

                                                                      I actually think it is breaking off by company1. The reason i think this is becasue that is where the form stops producing answers. So i am not sure if it is in the Jobappemp form that something is breaking.

                                                                      • 32. Re: Error Executing Database Query.
                                                                        Guy Dowd Level 1

                                                                        Or maybe there is an issue in the loop that jobappprocess goes into?<cfloop query="jobappemp">
                                                                        <tr>
                                                                        <td colspan="2">

                                                                        <table cellspacing="0" cellpadding="0" border="1" bordercolor="000000">
                                                                        <tr>
                                                                        <td align="center" rowspan="2" >Name and Address of Company<br>and Type of Business</td>
                                                                        <td align="center" height="3">From</td>
                                                                        <td align="center" height="3">To</td>
                                                                        <td rowspan="2" align="center">Weekly<br>Starting<br>Salary or Wage</td>
                                                                        <td rowspan="2" align="center">Weekly<br>Ending<br>Salary or Wage</td>
                                                                        <td rowspan="2" align="center">Reason for<br>Leaving</td>
                                                                        <td rowspan="2" align="center">Name of<br>Supervisor</td>
                                                                        <td height="3" bordercolor="ffffff" width="0"></td>
                                                                        </tr>
                                                                        <tr>
                                                                        <td align="center" height="12">Month/Year</td>
                                                                        <td align="center" height="12">Month/Year</td>
                                                                        <td height="2" bordercolor="ffffff" width="0"></td>
                                                                        </tr>
                                                                        <tr valign="top">
                                                                        <td rowspan="2" height="17">#company# </td>
                                                                        <td height="5">#empfromdate# </td>
                                                                        <td height="5">#emptodate# </td>
                                                                        <td height="5">#startwage# </td>
                                                                        <td height="5">#endwage# </td>
                                                                        <td height="10">#leavee# </td>
                                                                        <td height="10">#supervisore# </td>
                                                                        <td height="10" bordercolor="ffffff" width="0"></td>
                                                                        </tr>
                                                                        <tr valign="top">
                                                                        <td rowspan="2" colspan="6" height="30">#descriptione# </td>
                                                                        <td height="40" bordercolor="ffffff" width="0"></td>
                                                                        </tr>
                                                                        <tr>
                                                                        <td height="5">Telephone: #busphone#</td>
                                                                        <td height="5" bordercolor="ffffff" width="0"></td>
                                                                        </tr>
                                                                        </table>
                                                                        </td>
                                                                        </tr>
                                                                        <tr>
                                                                        <td colspan="2"> </td>
                                                                        </tr>
                                                                        </cfloop>