On Mon, Jul 7, 2008 at 9:57 AM, Phillip Vector <[EMAIL PROTECTED]> wrote: > I have the following code.. > > <cfinvoke component="FHCcfc.Queries" method="CheckPassword" > returnvariable="Check"></cfinvoke> > > in the cfc, I have.. > > <cffunction name="CheckPassword" returntype="query"> > <cfstoredproc procedure="CheckPassword" > dataSource="FoodHandlerCard"> > <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR" > value="#form.name#" dbVarName="@Name"> > <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR" > value="#form.password#" dbVarName="@Password"> > <cfprocresult name="Check"> > </cfstoredproc> > </cffunction> > > form.name and form.password are defined and when I put a <cfdump > var="#check#"> before the function ends, I get back a query result. So > I know it's pulling up a query result. > > So... Me being new to CFC's, why am I getting the error that it's not > returning a query when it seems to be doing so? I think it's creating > the query in the function, but then it isn't returning back to the > cfinvoke?
correct. it's not returning anything. your cffunction needs to have a <cfreturn /> tag in it in order for it to return a value. in this case, <cfreturn Check />, since you want the function to return the cf query object. -- A byte walks into a bar and orders a pint. Bartender asks him "What's wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I thought you looked a bit off." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308669 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4