Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

basic Flex to Coldfusion cfstoredproc question

Guest
Mar 23, 2008 Mar 23, 2008
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

369
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 23, 2008 Mar 23, 2008
crzymnmchl wrote:
> <cfargument name="rptNum" required="true" type="Integer">

try "numeric" instead of integer.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 23, 2008 Mar 23, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 24, 2008 Mar 24, 2008
LATEST
Thanks all! Now works perfectly.

Mic.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources