Reply to topic
Invalid CFML construct
mohonri_m


Joined: 11 Nov 2006
Posts: 2
Location: Birmingham, AL
Reply with quote
Okay, I'm at my wits end trying to find what is generating this error. Code was working fine until I added this line to the code:
AND #FORM[i]# NEQ "category"
. However, removing it doesn't solve the problem. Replacing the session variables with the hardcoded values only produces another error:
The string is not closed
. These are the errors that always seem to be something little, but I just can't figure it out at the moment.

Thanks for your help!
--
Shane

Code:

Invalid CFML construct found on line 95 at column 99.
ColdFusion was looking at the following text:

The CFML compiler was processing:

    * An expression that began on line 95, column 90.
      Your expression might be missing an ending "#" (it might look like #expr ).
    * the tag attribute "username", on line 95, column 80.
    * a cfquery tag beginning on line 95, column 18.
    * a cfquery tag beginning on line 95, column 18.

 
The error occurred in /vservers/cpremote/htdocs/billing/billing.cfc: line 95
Called from /vservers/cpremote/htdocs/billing.cfm: line 2
Called from /vservers/cpremote/htdocs/index.cfm: line 127

93 :    
94 :    <cffunction name="uploadBilling" access="remote">      
95 :       <cfquery name="addBill" datasource="#SESSION.auth.dataSource


Code:
<cffunction name="uploadBilling" access="remote">      
      <cfquery name="addBill" datasource="#SESSION.auth.dataSource#" username="#SESSION.auth.uname#" password="#SESSION.auth.pass#">
         INSERT into billing (billing_id, name, date, billingissuesid, status, category)
         VALUES ('', '#FORM.billIssues#', '#DateFormat(NOW(), 'mm-dd-yy')#', '', 0, '#category#')
      </cfquery>
      
      <cfquery name="getNewBillID" datasource="#SESSION.auth.dataSource#" username="#SESSION.auth.uname#" password="#SESSION.auth.pass#">
         SELECT billing_id, name, category FROM billing ORDER BY billing_id DESC LIMIT 1
      </cfquery>
      <cfoutput query="getNewBillID">
         <cfset billID=#billing_id#>
         <cfset billName="#name#">
         <cfset billCat="#category#">
      </cfoutput>
      
      <!----create the directory---->
      <cfftp action="open"
               server=""
               username=""
               password=""
               connection="upload"
               directory="/vservers/cpremote/htdocs/billing/"
               stopOnError="Yes">
      <cfdirectory action="create" directory="/vservers/cpremote/htdocs/billing/#billID#">
      <!---<cfftp action="changedir" directory="#billID#" connection="upload">---->
      
      <!---UPLOAD---->
      <cfloop index="i" list="#FORM.fieldNames#">
         <cfif #i# NEQ "BILLISSUES" AND #i# NEQ "UPLOAD" AND #FORM[i]# NEQ "" AND #FORM[i]# NEQ "category">
         <!----loop through the file fields ---->
            <cfif #i# EQ "invoice">
               <cfset type = "invoice">
            <cfelseif #i# EQ "zip">
               <cfset type = "zip">
            <cfelseif #i# EQ "hours">
               <cfset type = "hours">
            <cfelseif #i# EQ "summary">
               <cfset type = "summary">
            <cfelseif #i# EQ "detail">
               <cfset type = "detail">
            <cfelse>
               <cfset type = "receipt">
            </cfif>
            
            <cffile action="upload" nameconflict="makeunique" filefield="#i#" destination="/vservers/cpremote/htdocs/billing/#billID#" result="uploadFile" />
            <cfquery name="addBillFiles" datasource="#SESSION.auth.dataSource#" username="#SESSION.auth.uname#" password="#SESSION.auth.pass#">
               INSERT into billingfiles (billingfiles_id, file, type, billingid)
               VALUES ('', "#uploadFile.serverFile#", "#type#", #billID#)
            </cfquery>
         </cfif>
      </cfloop>
      
      <cfftp action="close" connection="upload">
      
      <!----EMAIL everyone---->
      <cfprocessingdirective suppresswhitespace="yes">
         <cfmail server=""
            username=""
            password=""
            subject="Updated billing files available on BURST"
            type="html"
            to="***removed to protect the innocent***"
            cc="***removed to protect the innocent***"
            bcc="BURST! Administrator <admin@spcburst.com>"
            from="BURST! Administrator <admin@spcburst.com>">
         <html>
         <body>
         Hello team,
         </body>
         </html>
         </cfmail>
      </cfprocessingdirective>
      
            
      <cflocation url="index.cfm" addtoken="no" />
   </cffunction>
Invalid CFML construct
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic