Arguments!! ;-)

-----Original Message-----
From: Frank Mamone [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 12 March 2003 3:29 p.m.
To: CF-Talk
Subject: Strange CFC problem

I'm using CFINVOKE to call a CFC and I get an error saying that certain
arguments are undefined when in fact they are. The error is:

"Element WATERCHANGE is undefined in ATTRIBUTES"


<cfcomponent>
 <cfset DATASOURCENAME = "#request.dsn#" />


 <cffunction name="addLog" access="remote" returntype="struct">
  <cfargument name="PH" type="string" required="true">
  <cfargument name="KH" type="string" required="true">
  <cfargument name="GH" type="string" required="true">
  <cfargument name="CO2" type="string" required="true">
  <cfargument name="Ammonia" type="string" required="true">
  <cfargument name="Nitrite" type="string" required="true">
  <cfargument name="Nitrate" type="string" required="true">
  <cfargument name="WComments" type="string" required="true">
  <cfargument name="WaterChange" type="string" required="true">
  <cfargument name="WCComments" type="string" required="true">
  <cfargument name="FilterMediaChange" type="string" required="true">
  <cfargument name="FMCComments" type="string" required="true">
  <cfargument name="CO2Refill" type="string" required="true">
  <cfargument name="CO2Comments" type="string" required="true">
  <cfargument name="TANKS_ID" type="string" required="true">



   <!--- Create new Transaction --->
  <CFQUERY datasource="#DATASOURCENAME#" name="trans">
  INSERT INTO AL_TRANS
  (TransDate ,TANKS_ID)
  VALUES
  (#Now()#, #TANKS_ID#)
  </CFQUERY>

 <!--- GET MAX ID --->

 <CFQUERY datasource="#DATASOURCENAME#" name="getTrans">
 SELECT max(ID) AS TransID
 FROM AL_TRANS
 </CFQUERY>

 <!--- INSERT WATER PARAMETERS --->

 <cfquery datasource="#DATASOURCENAME#" name="insValues">
 INSERT INTO AL_WATER
 (PH,KH,GH,CO2,Ammonia,Nitrite,Nitrate,WComments,TRANS_ID)
 VALUES
 (#arguments.PH#,
 #arguments.KH#,
 #arguments.GH#,
 #arguments.CO2#,
 #arguments.Ammonia#,
 #arguments.Nitrite#,
 #arguments.Nitrate#,
 '#arguments.WComments#',
 #getTrans.TransID#
 )
 </cfquery>

 <!--- INSERT MAINTENANCE VALUES --->
 <CFQUERY datasource="#DATASOURCENAME#" name="insMaint">
 INSERT INTO MAINTENANCE

(TRANSID,WaterChange,WCComments,FilterMediaChange,FMCComments,CO2Refill,CO2C
omments)
 VALUES
 (#getTrans.TransID#,
 '#attributes.WaterChange#',
 '#attributes.WCComments#',
 '#attributes.FilterMediaChange#',
 '#attributes.FMCComments#',
 '#attributes.CO2Refill#',
 '#attributes.CO2Comments#'
 </CFQUERY>

 <CFSET status = "Success">

 <cfreturn status>


 </cffunction>

</cfcomponent>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to