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