Well.. Wait...

        <cfinvoke component="FHCcfc.Queries" method="CreateUser"
returnvariable="CreateUser"></cfinvoke>

        <cffunction name="CreateUser" returntype="query">
                <cfstoredproc procedure="CreateUser" 
dataSource="FoodHandlerCard">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#CreateUUID()#" dbVarName="@UserID">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.FirstName#" dbVarName="@FirstName">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.MiddleName#" dbVarName="@MiddleName">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.LastName#" dbVarName="@LastName">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.Address#" dbVarName="@Address">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.City#" dbVarName="@City">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.State#" dbVarName="@State">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.Zip#" dbVarName="@Zip">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.Phone#" dbVarName="@Phone">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.Email#" dbVarName="@Email">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_INTEGER"
value="#form.UserType#" dbVarName="@UserType">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_INTEGER"
value="#form.HintType#" dbVarName="@HintType">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#form.HintAnswer#" dbVarName="@HintAnswer">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#cgi.REMOTE_ADDR#" dbVarName="@IP">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_INTEGER"
value="#form.EmployerID#" dbVarName="@EmployerID">
                        <cfprocparam type="IN" CFSQLType="CF_SQL_VARCHAR"
value="#Password#" dbVarName="@Password">
                        <cfprocresult name="CreateUser">
                </cfstoredproc>
                <cfreturn CreateUser>
        </cffunction>

This one has a cfreturn, but I'm getting the same error.. It's an
insert, so I removed the cfreturn and return variable and I still get
the same error as I did when they were there...

So... Is there some special way of running code in a CFC where I don't
need a return variable besides removing the cfreturn and
returnvariable?

On Mon, Jul 7, 2008 at 10:01 AM, CF-Talk <cf-talk@houseoffusion.com> 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">
>>
>
>                                    <cfset var Check = "" />
>>
>>                <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>
>>
>
>                                    <cfreturn Check />
>>
>>        </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?
>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:308681
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to