oracle forms - lock procedure property
I have an oracle form, where the lock procedure property of a data block is set to call a procedure 'lock_fn'. The procedure 'lock_fn' looks like below:
procedure lock_fn(outp IN OUT out_tab) IS
l_first BINARY_INTEGER := outp.first;
l_last BINARY_INTEGER := outp.last;
l_id a.id%type;
BEGIN
for i in l_first .. l_last loop
select id
into l_id
from a
where a.id=outp(i).id;
end loop;
END lock_fnl;
My question is, Would merely selecting the ids guarantee a row level lock?. Any help would be most welcome.
Edit: The LOCK-PROCEDURE trigger of the data block has the code auto-generated that looks like below:
DECLARE
bk_data FRMPKG.OUT_TAB;
BEGIN
PLSQL_TABLE.POPULATE_TABLE(bk_data, 'LOCK_FN', PLSQL_TABLE.LOCK_RECORDS);
FRMPKG.LOCK_FN(bk_data开发者_运维百科);
END;
Would merely selecting the ids guarantee a row level lock?
No. You'd need a SELECT FOR UPDATE (But then selecting just a single column would be sufficient).
精彩评论