No - in your query, leave datasource off. That's the point - you don't have to type it.
<cfquery name="foo"> Of course, if your query is an insert or delete, you can leave everything off <cfquery> On Wed, Feb 26, 2014 at 9:15 PM, Scott Williams <[email protected]>wrote: > > Hi everybody -- > > I have > > <cfset this.datasource = "myDataSource" /> > > in my Application.cfc file, just after the <component> tag and before the > cffunctions. > > When I create a cfquery, shouldn't I be able to use > > <cfquery name="queryName" datasource="#this.datasource#"> > blah blah > </cfquery> > > instead of hardcoding the datasource name into the query? > > Thanks in advance for your kind assistance. > > Scott Williams > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:6102 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
