Yes and <cfcomponent name="filename"> is at the top (and closing).
filename.cfc in the cfc directory <cfcomponent name="filename"> <cffunction name="Read" returntype="Query" access="remote"> <cfargument name="UserID" type="string"> <cfscript>var Data="";</cfscript> <cfquery DATASOURCE="#DS#" name="Data"> Select * From Users Where UserID=#UserID# </cfquery> <cfreturn Data> </cffunction> </cfcomponent> TestUsers.cfm 1 <cfinvoke component="cfc.filename" method="Read" returnvariable="User"> 2 <cfinvokeargument name="UserID" value="13204721-3474-8967-4897498740174013"> 3 </cfinvoke> 4 On Thu, Sep 24, 2009 at 12:49 PM, Dan Farrell <df...@guidance.com> wrote: > > Coldfusion user has permission to the file? > > >>So you're calling this file from within ColdFusion directly right? >> >>What happens if you create it using CreateObject? >> >><cfset myCFC = CreateObject('component','cfc.filename')> >><cfset user = myCFC.Read("13204721-3474-8967-4897498740174013")> >> >>Are you getting an error? >> >> >>andy >> >>So for the meantime, I've put my cfc directory in the web root on the >>development server I use. >> >>I have the following code to call the cfc >> >>1 >><cfinvoke component="cfc.filename" method="Read" returnvariable="User"> >>2 >><cfinvokeargument name="UserID" value="13204721-3474-8967-4897498740174013"> >>3 >></cfinvoke> >>4 >> >>I see the 1, but nothing else (which tells me cfinvoke is not working >>right). >> >>The filename is "filename.cfc" and is in the cfc directory (which is >>directly off the web root where I'm calling this). >> >>The read function shows the following.. >> >> <cffunction name="Read" returntype="Query" access="remote"> >> <cfargument name="UserID" type="string"> >> <cfscript>var Data="";</cfscript> >> <cfquery DATASOURCE="#DS#" name="Data"> >> Select * >> From Users >> Where UserID=#UserID# >> </cfquery> >> <cfreturn Data> >> </cffunction> >> >>Why isn't it working? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326597 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4