----------------------
YOU Wrote:
 but in general, how would you lock a certain record in a table while some
one is working on it ?


This is a bit different from the discussion so far - which has concentrated
on locking as it pertains to avoiding errors and race conditions. You can
lock a transaction and the record is protected while it is being written to
.... But  perhaps you are asking how to allow someone to edit data without
being overwritten by someone editing the same data. For example:

Bob opens a web page and goes to an edit tool and selects "jenny" to edit.

Sally opens a web page and goest to an edit tool and also selects "jenny" to
edit.


Bob updates "jenny" with new information...

A minute later Sally updates "jenny" with new information

Sally's update has overwritten Bobs - but sally never saw bob's information
.... She only saw the original information


To solve this problem we need a table or session or application variable
holding "checked out" records. The use of application.cfc is useful here
because the "onsessionend( )" function can be used to "clean up" locked
records that are orphaned by someone going out for pizza or pressing the red
"reset" butto non their PC. How you do it depends on how complicated your DB
schema is, and how granular you envision your locking scheme.

-mk



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252354
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