> <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 ______________________________________________________________________ Why Share? Dedicated Win 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=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists