first component . . .
Hi, I am trying take my stuff to the next level and currently trying to get this cfc to work. The component has two functions straight out of the Getting Started in cf8 book.
The fist function works just fine. It queries the database and returns a list forms.
The list page passes the variable to the details page like so: <a href="cfcDrivenDetails.cfm?rformID=#rformID#">
The second function in the component does not work. I keep getting the error below. The rformID field is numeric (autonumber - Access database)
I invoke the second function from the details page with the following code
<cfinvoke
component="CFC/reqForms"
method="getDetails"
returnvariable="form"
rformID="URL.rformid">
It says the errror is in the cfc at the line in bold below - any help is hugely appreciated and really needed!
thanks - jim
The RFORMID argument passed to the getDetails function is not of type numeric.
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.
the component:
cfcomponent>
<cffunction name="list" access="public"
returnType="query" output="false">
<!---define local variable--->
<cfset var forms=" ">
<!---Get forms list from database--->
<cfquery name="forms" datasource="formMagic">
SELECT rformID, wac, formName, description, formDoc, dueDate, forYear, docURL, submittal
FROM dueDateCalendar
</cfquery>
<cfreturn forms>
</cffunction>
<cffunction name="getDetails" access="public"
returnType="query" output="false">
<cfargument name="rformID" type="numeric" required="true">
<cfset var forms=" ">
<cfquery name="form" datasource="formMagic">
SELECT rformID, wac, formName, description, formDoc, dueDate, forYear, docURL, submittal
FROM dueDateCalendar
where rformID=#ARGUMENTS.rformID#
</cfquery>
<cfreturn form>
</cffunction>
</cfcomponent>
