Re: Lock record using cursor in Form, what time will the locks release?
Date: 14 Sep 1999 03:55:42 GMT
Message-ID: <19990913235542.01534.00001952_at_ng-ca1.aol.com>
>
>I am using Form 5.0. When I update a record, some rows in table A also need
>to update. So I am think using cursor in the pre-update trigger to lock the
>the rows in table A and update the rows in table A in post-update trigger.
>
>/* Pre-update trigger */
>declare
> cursor c1 is select '*' from A where code=:company.code for update
>nowait;
>begin
> open c1;
> ...
> /* NO close c1 statement */
>end;
>
>I am wondering what time the records in table A locked by cursor c1 be
>released?
When a commit is performed, all locks are released. Thus, when the pre-update completes, and the on-update completes SUCCESSFULLY, the locks should be released. This gets a little more complicated if you are doing Posts, and if there are errors - I don't know what happens then.
Dan Hekimian-Williams Received on Tue Sep 14 1999 - 05:55:42 CEST