SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Cffunction

  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    ny
    Posts
    560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Cffunction

    Hi all,
    Please with the error...

    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>

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    ny
    Posts
    560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The error was on the function return type which should be string instead of date... Thank u all


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •