Question
Illegal Argumet Exception in Cold Fusion
I have one district field on the form It is saving to
Database fone. Now I am trying to add second district field to DB
which is throwing error. Both first and second districts are
dropdown lists...
<cfinvoke webservice="#TEApplicationURL#" method="insertApplicationFirst">
<cfinvokeargument name="congressID" value="#val(Form.AppCongDist)#"/>
<cfinvokeargument name="congressID2" value="#val(Form.secondAppCongDist)#"/>
<cfinvokeargument name="role" value="#Session.Role#"/>
</cfinvoke>
The Name of second congressional district is :
<select name="secondAppCongDist">
In CFC file...
<cffunction name="insertApplicationFirst" output="false" access="remote" returntype="void">
<cfargument name="congressID" required="yes" type="numeric"/>
<cfargument name="congressID2" required="yes" type="numeric"/>
<cfargument name="role" required="yes" type="string"/>
<cfquery name="insApplicationCongDist" datasource="#Request.MainDSN#">
INSERT INTO APPLICATION_CONGRESS_DISTRICT(CONGRESS_DISTRICT_ID,CONG_DISTRICT2, APPLICATION_ID)
VALUES (#Arguments.congressID#,#Arguments.congressID2#, <cfloop query="getAppID">#APPLICATION_ID#</cfloop>)
</cfquery>
</cftransaction>
when I am doing this I am getting this error,,,
java.lang.IllegalArgumentException: argument type mismatch
I really appreciate your help on this...
Thanks...
CF bEginner
<cfinvoke webservice="#TEApplicationURL#" method="insertApplicationFirst">
<cfinvokeargument name="congressID" value="#val(Form.AppCongDist)#"/>
<cfinvokeargument name="congressID2" value="#val(Form.secondAppCongDist)#"/>
<cfinvokeargument name="role" value="#Session.Role#"/>
</cfinvoke>
The Name of second congressional district is :
<select name="secondAppCongDist">
In CFC file...
<cffunction name="insertApplicationFirst" output="false" access="remote" returntype="void">
<cfargument name="congressID" required="yes" type="numeric"/>
<cfargument name="congressID2" required="yes" type="numeric"/>
<cfargument name="role" required="yes" type="string"/>
<cfquery name="insApplicationCongDist" datasource="#Request.MainDSN#">
INSERT INTO APPLICATION_CONGRESS_DISTRICT(CONGRESS_DISTRICT_ID,CONG_DISTRICT2, APPLICATION_ID)
VALUES (#Arguments.congressID#,#Arguments.congressID2#, <cfloop query="getAppID">#APPLICATION_ID#</cfloop>)
</cfquery>
</cftransaction>
when I am doing this I am getting this error,,,
java.lang.IllegalArgumentException: argument type mismatch
I really appreciate your help on this...
Thanks...
CF bEginner