Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: deadlock

Re: deadlock

From: Pat Minnis <pminnis_at_indianaonline.net>
Date: 2000/01/24
Message-ID: <pg9j4.297$MU5.41841@news.goodnet.com>#1/1

Try doing it Oracle's way (Forms):

  1. Get the row you're after and save it off (not using "for update")
  2. At just the point your ready to update the row, read what's current for the actual row again (for update) and compare with your saved row.
  3. If they match, update the row.
  4. If they don't, give an error message telling the user, or get more complicated by putting the user back to update screen with current row data refreshed.

"Ben Grigsby" <grigsby_at_inquiregroup.com> wrote in message news:388cd17d.617784837_at_news.mindspring.com...
> I am writing an app in VC6 accessing an Oracle 8i database using
> RogueWave's dbtools.
>
> My problem is that I am trying to implement row-level locking in a
> distributed applicaition by declaring a cursor for update. It does
> lock the selected row, but any other processes that try to update the
> row simply hang forever until the row is unlocked.
>
> What I need is a way for the other processes to timeout if they cannot
> get a lock for a given row.
>
> I have tried a NOWAIT statement on the end of my select..for update
> statement, but it does not help.
>
> Is there some setting in the database that I can change to prevent
> this deadlock?
>
>
Received on Mon Jan 24 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US