Skip to main content
March 24, 2008
Question

basic Flex to Coldfusion cfstoredproc question

  • March 24, 2008
  • 3 replies
  • 388 views
Just starting this ride ...

<cfstoredproc procedure="gmac.sel_smmry_by_mnth( 3,'2001')" datasource="orcl"> called the Oracle proc correctly with the parms. I then attempted

<cfcomponent>
<cffunction name="getMasterQuery"
output="false"
access="remote">
<cfargument name="rptNum" required="true" type="Integer">
<cfargument name="yrInput" required="true" type="String">
returntype="query">
<cfstoredproc procedure="gmac.sel_smmry_by_mnth" datasource="orcl">
<cfprocresult
name="qSummary">
<cfprocparam type="in"
cfsqltype="CF_SQL_INTEGER"
value = rptNum>
<cfprocparam type="in"
cfsqltype="CF_SQL_VARCHAR"
value = yrInput>
</cfstoredproc>
<cfreturn qSummary>
</cffunction>
</cfcomponent>

with the Flex call

this.dataManager.getMasterQuery(3,"2001"); I get a CFC error saying

The RPTNUM argument passed to the getMasterQuery function is not of type Integer. Not sure why I am getting this error - any help much appreciated,

Mic

    This topic has been closed for replies.

    3 replies

    March 24, 2008
    Thanks all! Now works perfectly.

    Mic.
    Inspiring
    March 24, 2008
    Hi,

    Try changing your "rptNum" argument declaration's 'type' attribute as,

    <cfargument name="rptNum" required="true" type="numeric">

    and also all your 'cfsqltype="CF_SQL_INTEGER" ' occurences to "cf_sql_numeric"..

    HTH
    Inspiring
    March 24, 2008
    crzymnmchl wrote:
    > <cfargument name="rptNum" required="true" type="Integer">

    try "numeric" instead of integer.