On 9/26/02 11:10 AM, "Costas Piliotis" <[EMAIL PROTECTED]> wrote:
> I'm on an interesting thread right on in a discussion group in SQL Server > worldwide user's group. > > They insist that you need to maintain rowlocks when you read database > records for applications such as ticketmaster where you would lock a record > so no one else can take it. I understand the need for transaction locking > and the like for inserts and updates, but I don't understand why they insist > that you need to maintain record level locking. And I haven't the faintest > idea how you would release these row locks in a stateless environment like > the web. > > Has anyone here used rowlocks on selects successfully? It seems like what > they are saying is impossible. If you are JUST READING -- then I agree, It should not be required. But if you are doing ANY updating it IS required! Scenario: User A and User B both using your web DB system. User A wants to update record 1. A web page shows him the current values and gives him a chance to change them. User A is working on typing in the new values. User B wants to update record 1. A web page shows him the current values and gives him a chance to change them. User B is working on typing in the new values. WHOSE CHANGES end up in the database? Whoever hits the "submit" key last. You MUST have some type of record locking so that, when User B makes his request to update, he is told that someone else is updating that record and that he should try again later. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm

