With your example here you could use: <cfquery name="test" datasource="#getDsnBean().getName()#" etc...
Dominic 2009/7/26 Glyn Jackson <glyn.jack...@newebia.co.uk> > > Hi, I have my DNS bean injected into my CFC, I have used a setter. how do I > now use the dns details now 'within' my CFC. do I create it in my init > method? I want to do something like the following... > <cfquery name="test" datasource="#instance.dsn.getName()#" etc. > > -------------------------------------------------------------------------- > <cffunction name="getdsnBean" access="public" returntype="any" > output="false" hint="Return the dnsBean."> > <cfreturn instance['dns'] /> > </cffunction> > > <cffunction name="setdsnBean" access="public" returntype="void" > output="false" hint="Set the dsnBean."> > <cfargument name="dsnBean" type="any" required="true" hint="dsnBean" /> > <cfset instance['dsn'] = arguments.dsnBean /> > > </cffunction> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:324972 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4