Thanks Jake and Barney, I'll lock it and see if that helps. -- Josh
----- Original Message ----- From: "Jake Pilgrim" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Monday, September 10, 2007 2:50 PM Subject: Re: Odd database behavior: duplicate key error > If this is true - wrap the code in a named lock: > > <cflock name="aUniqueLockName" type="exclusive"> > .... your SQL here > </cflock> > > A named lock ensures that only one thread at a time will be allowed to run > the code within the cflock tag. CFTransaction will not give you this same > level of isolation. > > Jake Pilgrim > >>You probably have a race condition, where two people execute the code >>at the "same time", and the order goes like this: >> >>A - delete >>B - delete >>A - insert >>B - insert >> >>In this case, you'd expect the fourth statement (the second insert) to >>throw the dupe key exception. >> >>cheers, >>barneyb >> >> >> >>-- >>Barney Boisvert >>[EMAIL PROTECTED] >>http://www.barneyb.com/ >> >>Got Gmail? I have 100 invites. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288118 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

