If you have many args to pass in, I do it like this

<cfscript>
//instantiate the component
newJob = createObject("component","job");
//create the arg structure
variables.args = StructNew();
//assign the args
variables.args.Val1 = Form.Field1;
variables.args.Val2 = Form.Field2;
variables.args.Val3 = Form.Field3;
variables.args.Val4 = Form.Field4;
variables.args.Val5 = Form.Field5;
variables.args.Val6 = Form.Field6;
variables.args.Val7 = Form.Field7;
//call the method and pass in the arg collection
newJob.insertJob(argumentCollection=variables.args);
</cfscript>


HTH

--
Alan Rother
Macromedia Certified Advanced ColdFusion MX 7 Developer


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232634
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to