Subject | Re: SQL needs to be reviewd and some questions: |
---|---|
Author | Adam |
Post date | 2005-01-22T02:39:06Z |
> Hmmm, I have to test null since if someone is lockupdate DIVISION set
> 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?
>
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.