Never mind that last comment......didnt realize it was an application 
lock duh!!!!





There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
----- Original Message ----- 
From: "Stephen Moretti" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 9:06 AM
Subject: Re: Does this lock look right?


> > <cflock timeout="120" throwontimeout="No" type="EXCLUSIVE">
> >
> > <cfquery name="remove_content" 
datasource="#application.datasource#">
> > delete from builder where buildtime < '#cleardate#'
> > </cfquery>
> >
> > </cflock>
> >
> > I just want to make sure nobody triggers this once it has started.
> >
> What do you want to lock?  The use of the application variable or the 
delete
> query?
> 
> If you're after locking the SQL then you need a CFTRANSACTION.
> 
> You still need a lock around the use of the application variable, but, 
rule
> of thumb, never put a cflock around a query.  Your lock will be held 
until
> the CFQUERY completes, locking other users out of the application 
scope
> (particularly EXCLUSIVE locks) until that time.
> 
> Regards
> 
> Stephen
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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

Reply via email to