oops, wrong list, wrong thread. ;@) > -----Original Message----- > From: Rich Wild [mailto:[EMAIL PROTECTED]] > Sent: 18 February 2002 17:15 > To: CF-Talk > Subject: RE: Does this lock look right? > > > try looking in the cf-talk mailing list archives? I found this: > > http://www.mail-archive.com/[email protected]/msg69138.html > > > -----Original Message----- > > From: Stephen Moretti [mailto:[EMAIL PROTECTED]] > > Sent: 18 February 2002 17:07 > > To: CF-Talk > > 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 > > > >
______________________________________________________________________ Get Your Own 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=coldfusionb 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

