At 06:53 AM 6/27/2002 +0000, you wrote:
> > > > However, many people use the application scope for things that I
> >don't
> > > > consider good ideas (such as a datasource varaible).
> > >
> > >Can you elaborate?
> >
> > In the example I specified, a datasource variable.
> >
> > First you have to put it into an application variable, so code similar
> >to
> >this goes into the Application.cfm :
> >
> ><cflock>
> > <cfif isDefined("Application.dsn")>
> > <cfset application.dsn = "mydatasource">
> > </cfif>
> ></cflock>
> >
> >
> > Now you have to lock all your query statements every time you reference
> >the variable:
> >
> ><cflock>
> > <cfquery datasource="#application.dsn#">
> >
> > </cfquery>
> ></cflock>
> >
> >
> > In this case, you have added additional locking code, which takes
> >additional processing time, with no real added benefit for storing the
> >datasource information in an application variable.
>
>Indeed I would argue that locking a query this way is a bad thing.
I would agree. Which is why I do not recommend storing a 'datasource'
variable in the applications cope.
--
Jeffry Houser | mailto:[EMAIL PROTECTED]
Need a Web Developer? Contact me!
AIM: Reboog711 | Fax / Phone: 1-203-379-0773
--
My CFMX Book:
<http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20>
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists