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

Home -> Community -> Usenet -> c.d.o.server -> Re: Concurrency control

Re: Concurrency control

From: Roy Varghese <rvarghese_at_ibm.net>
Date: 1997/12/04
Message-ID: <3486fcaf.0@news1.ibm.net>#1/1

No, u dont have to write concurrency control code in PB. Locking is automatically done in Oracle. No worry there from the database point of view..
However as far as the application is concerned, since PB does not lock records during data input/modification, you may want to implement some sort of control so that users dont see an inconsistent result.

For e.g take the table

Item Qty_In_Hand

-----------    -----------------
Apples             10
Oranges           20
Bananas          30

Now consider 2 users using dw.Retrieve() at roughly the same time to retrieve values from the database. User A increments the qty for Apples by 10 and User B increments it by 40. Now depending on who saves first, the expected result for the other user would be not as expected.

But if you have 'Key and all updateable columns' specified in the 'Update' properties of your datawindow. The second user to save would get a 'Row changed between retrieve and update' error, which is somewhat better, but certainly not ideal.

Try your own workaround..

Regards

Roy V

Wong Yuk Tung (CS) wrote in message <665vdr$i59$1_at_infosite.cs.hku.hk>...
>Hi,
>
>I am new in using Powerbuilder and Oracle in developing client/server
>application. My problem is that should I explicitly writing codes for
>the Oracle database server in order to implement concurrency control
>in multi-user environment, where users are using client application
>developed by Powerbuilder.
>
>I just wonder whether the controlling function is automatically done
>by Oracle.
>
>Regards,
>
>------------------------------------------------------------
>Wong Yuk Tung
>HKU, Computer Science III
>pager : 71118626 a/c 228
>Hall membership:
>Simon K.Y. Lee Hall ------ We are Skyers, active and sincere
Received on Thu Dec 04 1997 - 00:00:00 CST

Original text of this message

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