Answered
using argumentCollection
can anyone help me with why this won't work please .. i have
a form which is put into a structure on processing:
<cfset projectDetails = structNew()>
<cfset projectDetails.projectName = "#form.projectName#">
<cfset projectDetails.description = "#form.description#">
then am trying to invoke a component and pass the struct to the component .. this is how i'm invoking it:
<cfinvoke component="modProjects"
method="uploadProject"
argumentcollection="#projectDetails#"
returnvariable="uProject">
and this is the actual component :
<cfcomponent output="false">
<cffunction name="uploadProject" access="public" type="struct" hint="upload new project for recent projects section">
<cfargument name="projectDetails" required="yes">
<cfquery name="uProject" datasource="sauce_remoting">
INSERT INTO projects
VALUES ('#arguments.projectName#', '#arguments.description#')
</cfquery>
</cffunction>
</cfcomponent>
Thx in advance
<cfset projectDetails = structNew()>
<cfset projectDetails.projectName = "#form.projectName#">
<cfset projectDetails.description = "#form.description#">
then am trying to invoke a component and pass the struct to the component .. this is how i'm invoking it:
<cfinvoke component="modProjects"
method="uploadProject"
argumentcollection="#projectDetails#"
returnvariable="uProject">
and this is the actual component :
<cfcomponent output="false">
<cffunction name="uploadProject" access="public" type="struct" hint="upload new project for recent projects section">
<cfargument name="projectDetails" required="yes">
<cfquery name="uProject" datasource="sauce_remoting">
INSERT INTO projects
VALUES ('#arguments.projectName#', '#arguments.description#')
</cfquery>
</cffunction>
</cfcomponent>
Thx in advance
