> Out of curiosity, why do you recommend using CFLOCK instead of
> CFTRANSACTION? The CFLOCK tag only affects CF code, and any decent
database
> provides transactional support. Using the database's own transactional
> support seems superior in several respects, to me.


To be totally honest, it never occured to me ;) I use CFTRANSACTION tags all
over my sites for commit / rollback situations but under the circumstances
described in this situation, I've always used CFLOCK.


Now you've suggested it though, I've given the suggestion some thought and I
don't see where it can be better in all cases. Especially when you consider
that using a cftransaction can potentially lock the entire table when this
may not be necessary.


Achieving the correct level of granularity dependant on your situation could
mean that CFLOCK in this case is better. It may not be, but without seeing
the entire app, I cannot say that it isn't the right choice....


As always, it depends on your particular situation and application as to
whether using CFTRANSACTION to lock a group of queries is better than
CFLOCK.


I may use CFTRANSACTION for locking in the future, but I will always
consider whether the CFLOCK tag is a better solution before I commit (pardon
the pun) to it.


Paul
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to