That was it!  Thanks Josh and Mark.

Ok... concerning createObject, etc.

I tried again with this line:

<cfset managers = createObject("component",
"c21-ar-sm-homesite.components.manager_authorization").init(application.dsn) />

but I got this error:

The method init was not found in component
E:\Inetpub\webroot\c21-ar-sm-homesite\components\manager_authorization.cfc.

How do I write the "init" method for the db in the component?

(And by the way, where should the line I wrote above, "<cfset managers...",
but put?  In the cfc?  In my application.cfm? In the calling page?

Rick




> -----Original Message-----
> From: Mark Kruger [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2008 4:48 PM
> To: CF-Talk
> Subject: RE: Waaahhhh! Why won't my CFC work!
> 
> I think you need to use soemthing other than "password" - isn't that a named
> attribute of cfinvoke?
> 
> Meanwhile I can't every debug these things using the 1 step "cfinvoke".  I
> always turn to createobject.
> 
> 
> <cfset        obj =
> createobject("component","c21-ar-sm-homesite.components.manager_authorizatio
> n")/>
> 
> <cfdump var="#obj#"/>
> 
> <cfset manager_id = obj.authenticate(email=form.email,
> password=form.password)/>
> 
> <cfoutput>#manager_id#</cfoutput>
> 
> 
> Mark A. Kruger, CFG, MCSE
> (402) 408-3733 ext 105
> www.cfwebtools.com
> www.coldfusionmuse.com
> www.necfug.com
> 
> -----Original Message-----
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2008 3:29 PM
> To: CF-Talk
> Subject: Waaahhhh! Why won't my CFC work!
> 
> Now, I feel better... (Oh, I so wanted, for the sake of time, to just use my
> common login scheme using cfinclude... but I *had* to try a cfc...)
> 
> Assuming my form does have the password formfield in it...
> 
> Why would I get the error:  (When I cfdump the form scope, it shows
> "password"
> as one of the fields...)
> 
> 
> The PASSWORD parameter to the authenticate function is required but was not
> passed in.
> 
> The error occurred in E:\Inetpub\webroot\c21-ar-sm-homesite\cfm\login.cfm:
> line 41
> 
> 39 :          method="authenticate"
> 40 :          returnVariable="manager_id"
> 41 :          email="#form.email#"
> 42 :          password="#form.password#">
> 43 :
> 
> 
> from this code: ( and yes, I'm working on instantiating...)
> 
>       <cfinvoke
> 
> component="c21-ar-sm-homesite.components.manager_authorization"
>               method="authenticate"
>               returnVariable="manager_id"
>               email="#form.email#"
>               password="#form.password#">
> 
>       <cffunction access="public" name="authenticate" output="0">
> 
>               <cfargument name="email" type="string" required="1"/>
>               <cfargument name="password" type="string" required="1"/>
> 
>               <cfquery name="checkAuthentication" datasource="#dsn#">
>                       SELECT manager_id
>                       FROM managers
>                       WHERE email = '#arguments.email#'
>                       AND password = '#arguments.password#'
>               </cfquery>
> 
>               <cfif checkAuthentication.recordCount>
>                       <cfreturn checkAuthentication.manager_id/>
>               <cfelse>
>                       <cfreturn 0/>
>               </cfif>
>       </cffunction>
> 
> ???
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:307789
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