Yeah, but the "Variables" scope isn't persistent.  Each time a page loads it
will unset itself.  It would be better IMHO to just do a plain vanilla
CFSET.

--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC  28270
www.solutionmasters.com
704.563.5559 x 228  Voice
704.849.9291  Fax
-----Original Message-----
From: Todd Ashworth <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, August 29, 2000 4:48 PM
Subject: Re: CFLOCK datasource var?


>You shouldn't need to use a Session variable for your DSN .. especially if
>you are going to be setting it over and over in your Application.cfm.  That
>defeats the purpose of having a Session variable anyway.  You could get by
>with another scope .. say Variables.ds, or something.  That way, you
>wouldn't have to worry about locking at all.
>
><cfif not IsDefined('Variables.ds')>
>    <cfset Variables.ds = "something_dev">
></cfif>
>
>Todd Ashworth
>
>----- Original Message -----
>From: "Ricq Pattay" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, August 29, 2000 4:42 PM
>Subject: CFLOCK datasource var?
>
>
>| In my application.cfm I set a session var for all my queries' datasource
>| like this:
>|
>| <cflock scope="session" timeout="30" type="exclusive">
>|  <cfset session.ds = "something_dev">
>| </cflock>
>|
>| So... Do I need to read-only lock every reference to session.ds in all my
>| other templates where I have a query using that datasource session var?
>| e.g.,
>|
>| <cfquery name="get_year" datasource=#session.ds#>
>| select sysdate from dual
>| </cfquery>
>|
>| Since session.ds is always identical for every user of this site, what
>does
>| it matter if it's locked or not?
>|
>| ~~~~~~~~~~~~~~~~~~~~~~~~
>| Ricq Pattay <[EMAIL PROTECTED]>
>| Univ of Minnesota - Twin Cities
>| College of Veterinary Medicine
>|
>|
>|
>|
>| -------------------------------------------------------------------------
-
>----
>| Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>| To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>|
>
>
>---------------------------------------------------------------------------
---
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to