4 Replies Latest reply on May 12, 2009 2:11 PM by emmim44

    CFC Errror -Date

    emmim44 Level 1

      Error:

      The argument ENDDATE passed to function get() is not of type date.If the component name is specified as a type of this argument, the reason for this error might be that a definition file for such component cannot be found or is not accessible. The specific sequence of files included or processed is: C:\Inetpub\wwwroot\Denemeler\Test\connector_test.cfm, line: 11

       

      Any help is appreciated...

       

      <cfcomponent>
      <cffunction name="get"  returntype="query">
      <cfargument name="DSN" required="true" type="string">
      <cfargument name="startDate" required="true" type="date">
      <cfargument name="endDate" required="true" type="date">

      <cfargument name="qOper" required="true" type="query">
      <cfargument name="config" type="array" required="true" hint="Can lists of lists values">


      <cfquery name="getCSAT" datasource="#arguments.DSN#">
          SELECT EMPLOYEE_ID, 0 AS Invalid,
          SUM(DTV_SALES)  AS Value
          FROM OPS$SCA_METRIC_SCORE
          WHERE SCORE_DATE between '#DateFormat(arguments.startdate, "dd-mmm-yy")#'
          AND '#DateFormat(arguments.EndDate, "dd-mmm-yy")#'
          AND  EMPLOYEE_ID IN (<cfqueryparam value="#ValueList(arguments.qOper.EID)#" cfsqltype="CF_SQL_VARCHAR" list="Yes">)
          GROUP BY EMPLOYEE_ID
      </cfquery>
      <cfreturn getCSAT>
      </cffunction>
      </cfcomponent>

       

       

      ----

      <cfscript>
      CCConf    = structnew();
      CCConf.MyConnector = "orct1";
      CCConf.Method = "get";
      CCConf.DSN   = application.Orc; //Oracle DSN
      CCConf.Sql   = application.Sql; //SQL 05 DSN
      CCConf.startDate = "04/01/2009";
      CCConf.endDate  = "04/31/2009";
      CCConf.Config = arraynew(1);
      </cfscript>