I'm just beginning to work with CFC's, so I'm in no position to be able to validate your code, however (and it's probably just a typo in your email), I did notice a missing ">" at the end of this line:
<cfargument name="ds" required="true" type="string" That could be throwing off the setting of the <cfset variables.ds=arguments.ds> line. Just a guess... Rick > -----Original Message----- > From: Ian Rutherford [mailto:[EMAIL PROTECTED] > Sent: Monday, June 23, 2008 11:35 PM > To: CF-Talk > Subject: variables.whatever isn't defined in CFC > > I'm trying to create a cfc in my application scope but the variables I set in > the init method don't seem > to be persistent. > > Here is the init method: > > <cfcomponent displayname="coupons" hint="Checks validity and type of coupon > and applies it to order."> > > <cffunction name="init" access="public" output="false" > returntype="coupon"> > <cfargument name="ds" required="true" type="string" > <cfset variables.ds=arguments.ds> > <cfreturn this> > </cffunction> > > Here's the call in the Application.cfc > > <cfset Application.coupons = createObject("component", > "coupon").init(application.admin.ds)> > > Here is the method that throws the "variables.ds not defined error" > > <cfstoredproc procedure="pr_getCouponList" datasource="#variables.ds#" > debug="Yes"> > <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" > dbvarname="@Active" > value="#arguments.Active#" null="No"> > <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" > dbvarname="@Sort" > value="#arguments.gridSortColumn#" null="No"> > <cfprocresult name="getCouponList" resultset="1"> > </cfstoredproc> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:308019 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4