CFTRANSACTION do this:
<cftransaction> INSERT query SELECT sequence.currVal query </cftransaction> The transaction tags force both queries to run as a single transaction which means it's not possible for any other inserts to happen between them - or even at the same time. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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