10 Replies Latest reply on May 22, 2009 10:34 AM by mack_

    CF function

    emmim44 Level 1

      Hi all,

       

      Error:

      If the component name is specified as a return type, the reason for this error might be that a definition file for such component

      cannot be found or is  not accessible.

       

      Code:

       

      <cffunction name="getSupLevel" returntype="date">
        <cfargument name="fn" type="string" required="true">
        <cfargument name="ln" type="string" required="true">
          <cfquery name="getSupLoginDate" datasource="#application.DSN#">
            SELECT  loginDate
            FROM user_tbl
            WHERE first_name = <cfqueryparam cfsqltype="CF_SQL_CHAR" value="#arguments.fn#">
            AND  last_name = <cfqueryparam cfsqltype="CF_SQL_CHAR" value="#arguments.ln#">
          </cfquery>
          <cfreturn getSupLoginDate.loginDate>
      </cffunction>

       

       

        <cfif ccflevelid eq 4 And getSupLevel(first_name,last_name) neq "">
         <cfset newlogdate = getSupLevel(first_name,last_name)>
          <cfelse>
           <cfset newlogdate = #loginDate#>
        </cfif>