Optimistic Locking Using ORA_ROWSCN
For anyone who has manually written an Update Statement in a Web Application, the issue of Optimistic Locking always took a while to address. The normal convention is to use a series of hidden elements for every form element that is submitted and doing an "old vs new" comparison in the Update statement to see if any valus in the database have changed. I found the main drawback was the need to create large amounts of hidden elements that are then passed into the DML procedure for evaluation. I came across ORA_ROWSCN in 10GR2 that reduces the amount of hidden form elements you need to submit. Its basically a new pseudo column in that database that provides the SCN (System Clock Number for the last time the row was updated) associated with individual rows when they were read. The basic steps to utilise this approach are as follows: 1) create table users (id number, name VARCHAR2 (100), address VARCHAR2 (100), tel NUMBER) ROWDEPENDENCIES / ROWDEPENDENCIES need to set as SCN by de