Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with selecting/updating rows
What you need is either select for update or an explicit lock table in row share
mode.
Select for update will lock any row that gets retrieved until the transaction is
either committed or rolled back.
From this post I can't see what your frontend is, developer 2000 will lock any
row as soon as the operator changes something.
Hth,
Sybrand Bakker, Oracle DBA
Dennis R. Leon wrote:
> I'm having a problem with selecting and updating rows on a table by two
> concurrent users.
> I was wondering if anybody knows a way to prevent a second user from
> SELECTING the same row that a first user has already selected.
>
> My problem is this:
> User one selects a row, validates that row and then updates the status of
> that row. While User one is doing this, User two goes and selects that same
> row, validates the row and fails because User one has already updated the
> status of that row and is no longer valid for my operation.
>
> What I want is this:
> User one selects a row and HIDES/LOCKS that row from the next User,
> validates that row and then updates the status of that row. While User one
> is doing this, User two selects the next row (not the row User one is
> working on) and HIDES/LOCKS that row from the next user, validates that row
> and then updates the status of that row. This will prevent Users
> interfering with each-other's work.
>
> Your HELP would be greatly appreciated.
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> Dennis R. Leon
> dleon_at_rim.net
>
> Research In Motion Ltd.
> Voice: (519) 748-2100 x328
> Fax: (519) 748-4532
> http://www.rim.net
Received on Mon Nov 09 1998 - 11:49:46 CST
![]() |
![]() |