home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,262 of 2,288   
   Ana C. Dent to Peter K   
   Re: lock?   
   14 Nov 07 15:46:16   
   
   From: anacedent@hotmail.com   
      
   Peter K  wrote in   
   news:473ab56d$0$15889$edfadb0f@dtext01.news.tele.dk:   
      
   > Hi   
   >   
   > I am writing a program (in c#) which provides functions for "document   
   > handling". Each document is represented by a row in an Oracle database   
   > table, and I need some way to "lock" this row if a user is editing the   
   > document. (Database/sql is not my strong side, but I need to come up   
   > with some sort of mechanism for this).   
   >   
   > By "locking" I mean that I have some means to say "this document is   
   > being edited by a user and no other user can/should edit it".   
   >   
   > How can I make such a lock? I was thinking of a column called "lock"   
   > which I could set to the user's id if they were editing the document -   
   > but then I don't know how to ensure that only one user could attempt   
   > to obtain the lock at a time if, for example, two users simultaneously   
   > asked for the lock.   
   >   
   > Any hints are very welcome!   
   >   
   > Thanks,   
   > Peter   
   >   
      
   SELECT ...........       FOR UPDATE   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca