Sorry for my ignorance on this,

I would have suggested using cftransaction.  However, now, I'm thinking 
that cftransaction may just ensure that that particular "thread" of 
commits are done in order but it doesn't prevent other "threads'" from 
colliding with the database which is why cflock is used?

Is that correct?

Vince




Jake Pilgrim wrote:
> 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. 
>>     
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288149
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to