SitePoint Sponsor

User Tag List

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

    Cffunction error

    The argument TEAM passed to function SearchRes() is not of type numeric.
    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 error occurred in C:\Inetpub\wwwroot\search.cfc: line 4

    2 :
    3 : <cffunction name="SearchRes" access="public" returntype="query">
    4 : <cfargument name="DSN" type="string" required="yes">
    5 : <cfargument name="Role" type="string" required="no">
    6 : <cfargument name="Team" type="numeric" required="no">



    Please look at the above error...any help app...


    code ------------------------->


    <cfcomponent hint="This cfc does search...">

    <cffunction name="SearchRes" access="public" returntype="query">
    <cfargument name="DSN" type="string" required="yes">
    <cfargument name="Role" type="string" required="no">
    <cfargument name="Team" type="numeric" required="no">
    <cfargument name="Level" type="numeric" required="no">

    <cfargument name="zone" type="numeric" required="no">
    <cfargument name="Dept" type="numeric" required="no">
    <cfargument name="location" type="numeric" required="no">

    <cfargument name="csgid" type="string" required="no">
    <cfargument name="status" type="string" required="no">
    <cfargument name="filter" type="string" required="no">
    <cfargument name="bosseid" type="string" required="no">
    <cfdump var="#arguments#">
    <cfquery datasource="#arguments.DSN#" name="SearchRes">
    Select
    r.First_name,
    r.Last_name,
    r.EID,
    r.tech_id,
    r.title,
    r.hire_date,
    r.rehire_date,
    l.location,
    d.department
    from
    OPS$RMS.REF_resource r,
    OPS$RMS.Ref_department d,
    OPS$RMS.REF_Location l
    where
    r.location_code = l.location_code
    And r.department_code = d.department_code

    <cfif arguments.role neq "">
    And r.role_code = '#arguments.role#'
    </cfif>
    <cfif arguments.Team neq "">
    And r.team_code = #arguments.team#
    </cfif>
    <cfif arguments.level neq "">
    And r.level_code = #arguments.level#
    </cfif>
    <cfif arguments.zone neq "">
    --And r.zone_code = #arguments.zone#
    </cfif>

    <cfif arguments.dept neq "">
    And r.department_code = #arguments.dept#
    </cfif>
    <cfif arguments.location neq "">
    And r.location_code = #arguments.location#
    </cfif>
    <cfif arguments.csgid neq "">
    And r.csg_operator_id like '#arguments.csgid#%'
    </cfif>
    <cfif arguments.status neq "">
    And r.status = '#arguments.status#'
    </cfif>
    <cfif arguments.filter neq "">
    And
    (
    r.EID = '#arguments.filter#%'
    OR r.First_name like '#arguments.filter#%'
    OR r.last_name like '#arguments.filter#%'
    OR r.tech_id like '#arguments.filter#%'
    )
    </cfif>
    <cfif arguments.bosseid neq "">
    And r.boss_id = '#arguments.bosseid#%'
    </cfif>

    </cfquery>
    <cfreturn SearchRes>
    </cffunction>

    </cfcomponent>

  2. #2
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Aberdeen, Scotland
    Posts
    379
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you're calling that function what value are you passing for TEAM. Whatever it is ColFusion is telling you it's not a number.

    Cheers
    James

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


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
  •