You don't close the CFAPPLICATION tag, it is used only to set values based
on it's attributes; it doesn't enclose anything.

When you set variables, you must supply a scope to them. If you don't, it
defaults to the VARIABLES scope.  You want this:

<cfset application.dsn_course_catalog = "db_cource_catalog" />
       ^^^^^^^^^^^^

That'll set the variable in the APPLICATION scope.  There are also
ATTRIBUTES, CALLER, REQUEST, SESSION, CLIENT, and SERVER scopes.  Of those,
REQUEST, SESSION and CLIENT are the three to primarily worry about.

cheers,
barneyb

> -----Original Message-----
> From: Austin Govella [mailto:[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
Get the mailserver that powers this list at http://www.coolfusion.com

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

Reply via email to