The value returned from the CheckPassword function is not of type query.

View: New views
9 Messages — Rating Filter:   Alert me  

The value returned from the CheckPassword function is not of type query.

by Phillip M. Vector-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

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

Re: The value returned from the CheckPassword function is not of type query.

by Charlie Griefer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 7, 2008 at 9:57 AM, Phillip Vector
<vector@...> 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=17837.14401.4

Re: The value returned from the CheckPassword function is not of type query.

by Phillip M. Vector-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Doesn't the <cfprocresult name="Check"> in the cfstoredproc handle the
returning of the information? Can I safely get rid of that then?

On Mon, Jul 7, 2008 at 10:02 AM, Charlie Griefer
<charlie.griefer@...> wrote:

> On Mon, Jul 7, 2008 at 9:57 AM, Phillip Vector
> <vector@...> 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:308670
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.4

Parent Message unknown RE: The value returned from the CheckPassword function is not of type query.

by Brad Wood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, that line of code simply creates a variable which contains the
result set returned from the proc.  In order to actually return that
variable, you need to use <cfreturn>

You can create infinite variables of any given type in a method, but the
one you wish to return to the caller needs to be specified by the
cfreturn tag.

~Brad

-----Original Message-----
From: Phillip Vector [mailto:vector@...]
Sent: Monday, July 07, 2008 12:10 PM
To: CF-Talk
Subject: Re: The value returned from the CheckPassword function is not
of type query.

Doesn't the <cfprocresult name="Check"> in the cfstoredproc handle the
returning of the information? Can I safely get rid of that then?

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

Re: The value returned from the CheckPassword function is not of type query.

by Phillip M. Vector-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok.. Thanks. :)

On Mon, Jul 7, 2008 at 10:13 AM, Brad Wood <bradwood@...> wrote:

> No, that line of code simply creates a variable which contains the
> result set returned from the proc.  In order to actually return that
> variable, you need to use <cfreturn>
>
> You can create infinite variables of any given type in a method, but the
> one you wish to return to the caller needs to be specified by the
> cfreturn tag.
>
> ~Brad
>
> -----Original Message-----
> From: Phillip Vector [mailto:vector@...]
> Sent: Monday, July 07, 2008 12:10 PM
> To: CF-Talk
> Subject: Re: The value returned from the CheckPassword function is not
> of type query.
>
> Doesn't the <cfprocresult name="Check"> in the cfstoredproc handle the
> returning of the information? Can I safely get rid of that then?
>
>

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

Parent Message unknown Re: The value returned from the CheckPassword function is not of type query.

by Phillip M. Vector-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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=17837.14401.4

Parent Message unknown RE: The value returned from the CheckPassword function is not of type query.

by Brad Wood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Your problem is your CFFUNCTION specifies the returntype attribute.
When you do that you are telling ColdFusion to expect the function to
return something-- and more specifically, to expect a particular type of
variable to be returned.

If you have a method which does not return any information to the
calling code, than remove the returntype="query"--  Simple as that.

~Brad

-----Original Message-----
From: Phillip Vector [mailto:vector@...]
Sent: Monday, July 07, 2008 2:23 PM
To: CF-Talk
Subject: Re: The value returned from the CheckPassword function is not
of type query.

Well.. Wait...

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

        <cffunction name="CreateUser" returntype="query">


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?

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

Re: The value returned from the CheckPassword function is not of type query.

by Charlie Griefer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

if i'm understanding what you're asking... a cffunction doesn't have
to return a value.  just set the returntype="void" and omit a
<cfreturn /> value.

however, sometimes on things like inserts/updates, it's advisable to
return a boolean based on whether or not the insert/update succeeded
(using <cftry>/<cfcatch> in the function) :)

On Mon, Jul 7, 2008 at 12:23 PM, Phillip Vector
<vector@...> wrote:

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

Re: The value returned from the CheckPassword function is not of type query.

by Phillip M. Vector-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

*slaps his hand to his head*

Thanks.

On Mon, Jul 7, 2008 at 12:34 PM, Charlie Griefer
<charlie.griefer@...> wrote:

> if i'm understanding what you're asking... a cffunction doesn't have
> to return a value.  just set the returntype="void" and omit a
> <cfreturn /> value.
>
> however, sometimes on things like inserts/updates, it's advisable to
> return a boolean based on whether or not the insert/update succeeded
> (using <cftry>/<cfcatch> in the function) :)
>
> On Mon, Jul 7, 2008 at 12:23 PM, Phillip Vector
> <vector@...> wrote:
>> 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@...> 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:308685
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.4
LightInTheBox - Buy quality products at wholesale price!