Skip to main content
August 12, 2009
Answered

CFC method argument integer not seen as integer

  • August 12, 2009
  • 2 replies
  • 2937 views

I am stumped. I am calling a method in a CFC that accepts two arguments.  The first is of type integer and the second is a string.

Here is the snippet of code where I instantiate the CFC and then later call the method in question.

<cfobject component="feedback" name="UserFeedback">
...
<cfset void = UserFeedback.send_feedback_rec(33312, 'foo@bar.com')>

The error I get is:

"The URLID argument passed to the send_feedback_rec function is not of type  integer. If the component name is specified as a type of this argument, its  possible that a definition file for the component cannot be found or is not  accessible."

Why does an explicit integer value not get recognized as type integer in the method??

    This topic has been closed for replies.
    Correct answer -__cfSearching__-

    cfcoder2 wrote:

    Why does an explicit integer value not get recognized as type integer in the method??

    "Integer" is not a built in cfargument type.  Perhaps you were thinking of "numeric"?

    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_a-b_6.html

    2 replies

    -__cfSearching__-Correct answer
    Inspiring
    August 12, 2009

    cfcoder2 wrote:

    Why does an explicit integer value not get recognized as type integer in the method??

    "Integer" is not a built in cfargument type.  Perhaps you were thinking of "numeric"?

    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_a-b_6.html

    August 12, 2009

    Doh!! Thanks for pointing out my dumb mistake. That was it!  Thinking in SQL mode.

    Inspiring
    August 12, 2009

    Yes, whenever you switch language modes the brain takes a few minutes to fully catch up ;-)

    August 12, 2009

    Forgot to add the method definition snippet...

    <cfcomponent>
        <cfset Variables.DBS = Application.DBS>
        <cfset Variables.stAMIDRec = StructNew()>
        <cfset Variables.stUserRec = StructNew()>

    ...

        <cffunction name="send_feedback_rec" access="public" returntype="void">
            <cfargument name="UrlID" type="integer" required="yes">
            <cfargument name="RecipientList" type="string" required="no" default="foobar@domain.com">

         ...

         </cffunction>