Easy CFC question (I hope)

2013-05-09 Thread Bruce Sorge
Hey, I am doing a project for my CF class in college. I admit that I have not played with CFC's in a while, but I cannot figure out why this is not working: cffunction name=adduser hint=Adds a new user to the database returntype=query cfargument name=fname required=true

Re: Easy CFC question (I hope)

2013-05-09 Thread morgan lindley
Change your return to: cfretun qUserEmail As you have it, it's attempting to return a reference to the adduser method. ~| Order the Adobe Coldfusion Anthology now!

Re: Easy CFC question (I hope)

2013-05-09 Thread Dave Watts
cffunction name=adduser hint=Adds a new user to the database returntype=query ... cfquery name=qUserEmail SELECT fname, lname, email, secureHash FROM users WHERE userid = #newID#

Re: Easy CFC question (I hope)

2013-05-09 Thread Bruce Sorge
Damn it. Stupid rookie mistake. Sent from my iPhone 4S. On May 9, 2013, at 11:55 AM, morgan lindley greyk...@gmail.com wrote: Change your return to: cfretun qUserEmail As you have it, it's attempting to return a reference to the adduser method.

RE: Easy CFC question (I hope)

2013-05-09 Thread DURETTE, STEVEN J
Subject: Re: Easy CFC question (I hope) snip You specified that the component returns a query object in the first line. But you're trying to return an instance of the component. You need to change one or the other. In this case, you probably want to change your CFRETURN to return the query object

Re: Easy CFC question (I hope)

2013-05-09 Thread Bruce Sorge
I just did what dave and morgan suggested and it worked like a charm. Embarrassed that I made this beginner mistake. I have about six or so more functions above this one that all work fine, just didn't pay attention to details on this one. Bruce On May 9, 2013, at 12:02 PM, DURETTE, STEVEN J

Re: Easy CFC question (I hope)

2013-05-09 Thread Dave Watts
Actually up higher he does a cfset var adduser = / so he is actually returning a variable. He can solve it either using your way or by doing a cfset adduser = qUserEmail / before the cfreturn. I didn't see that. I would recommend against creating a variable with the same name as the

RE: Easy CFC question (I hope)

2013-05-09 Thread DURETTE, STEVEN J
Subject: Re: Easy CFC question (I hope) I just did what dave and morgan suggested and it worked like a charm. Embarrassed that I made this beginner mistake. I have about six or so more functions above this one that all work fine, just didn't pay attention to details on this one. Bruce

RE: Easy CFC question (I hope)

2013-05-09 Thread Ian Chapman
Chnage to cfreturn qUserEmail -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: 09 May 2013 16:57 To: cf-talk Subject: Re: Easy CFC question (I hope) cffunction name=adduser hint=Adds a new user to the database returntype=query ... cfquery name

Re: Easy CFC question (I hope)

2013-05-09 Thread Bruce Sorge
just my .01 (I'm too cheap to give 2 cents!) LOL. -Original Message- From: Bruce Sorge [mailto:sor...@gmail.com] Sent: Thursday, May 09, 2013 12:06 PM To: cf-talk Subject: Re: Easy CFC question (I hope) I just did what dave and morgan suggested and it worked like a charm

Re: Easy CFC question (I hope)

2013-05-09 Thread Mike K
cents!) LOL. -Original Message- From: Bruce Sorge [mailto:sor...@gmail.com] Sent: Thursday, May 09, 2013 12:06 PM To: cf-talk Subject: Re: Easy CFC question (I hope) I just did what dave and morgan suggested and it worked like a charm. Embarrassed that I made this beginner

Re: Easy CFC question (I hope)

2013-05-09 Thread Eric Roberts
adduser is set to ...unless i missed it, i do't see it being assigned the return value of the query. If you are supposed to be returning the new ID then you would want cfreturn qUserEmail Eric On Thu, May 9, 2013 at 10:49 AM, Bruce Sorge sor...@gmail.com wrote: Hey, I am doing a project