Skip to main content
Participating Frequently
May 5, 2010
Question

cfargument error

  • May 5, 2010
  • 2 replies
  • 1878 views

Context validation error for tag cfargument.

The tag must be nested inside a CFFUNCTION tag.

<cfinvoke argument= "dsn" value="REQUEST.APPLICATION.dsn#">

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    May 5, 2010

    <cfargument name="dsn"  value="#REQUEST.Apllication.dsn#">

    Context validation error for tag cfargument.

    The tag must be nested inside a CFFUNCTION tag.

    Sorry I mentioned it in correct way.

    ilssac
    Inspiring
    May 5, 2010

    Where are you using the <cfargument...> tag?

    Is it inside a <cffunction...></cffunction> block?

    As the error and documention are telling us, the <cfargument...> tag is only allowed inside a <cffunction..> block.

    Participating Frequently
    May 5, 2010

    I am using with cfinvoke method to pass the parameters.

    <cfinvoke component="rate.functions.sql.feepurpose" method="insertFee" returnvariable="insertFeeResult">

    <cfargument name="dsn"                       value="#REQUEST.APPLICATION.dsn#">       
    <cfargument name="dsuser"             value="#REQUEST.APPLICATION.dsuser#">
    <cfargument name="dspass"             value="#REQUEST.APPLICATION.dspass#">

    </cfinvoke>

    Inspiring
    May 5, 2010

    Is this a <cfinvoke> tag or a <cfinvokeargument> tag?  It looks malformed, either way.

    Additionally, you're missing a #.

    Tou could probably do with reading the docs a bit:

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7e09.html

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7e0a.html

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7e47.html

    --

    Adam

    Message was edited by: Adam Cameron.