CFApplication doesn't have an end tag.  Just put it at the top of your
Application.cfm page, setting the attributes you want/need to set.

Then on your Application.cfm page, set your global variables.

You should scope your variables.

I use the request scope ... <cfset request.myDSN="datasource">

If you use the application scope (cfset application.myDSN="data">), you need
to lock your write and read of these variables (I'm not using CFMX yet, but
I don't think you need to lock them in CFMX). (learn up on CFLOCK, if
necessary).

Last thing you need to know is that if you're setting a lot of global
variables, it's best to use CFSCRIPT

<cfscript>
        request.myDSN='datasource';
        request.myEmail='[EMAIL PROTECTED]';
</cfscrpt>

H.


> -----Original Message-----
> From: Austin Govella [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2003 10:22 AM
> To:   CF-Talk
> Subject:      cfapplication: really basic question
> 
> I'm setting app wide variables for DSNs in Application.cfm.
> 
> My book says you set them after the CFAPPLICATION tag, but it doesn't say 
> there's an end tag. I was worried the app might not know when varialbles 
> stoppped being app variables...
> 
> So, I have:
> 
> <cfapplication
>       name="blah">
> 
> <cfset dsn_course_catalog = "db_course_catalog">
> 
> Is that all I need? It seems like you'd wanna close the CFAPPLICATION tag,
>   but I can't find an example like that.
> 
> Many thanks,
> --
> Austin Govella
> Grafofini
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to