Subject Re: SQL needs to be reviewd and some questions:
Author Adam
> Hmmm, I have to test null since if someone is lock
> that record (locked <> null), then I definitely need
> to skip and exit from the procedure. Am I missing
> something? why will it raise exception if i test null?
>

update DIVISION set
LOCKED = :PostBy
where ID = :DivisionID;

This query Will raise an exception if another transaction has locked
that record. Testing for null wont raise an exception, it is just not
necessary.

Once you commit, the lock is automatically released. Only one
transaction can edit a record at a time.