I have in a TOraQuery, beside normal select statements like
Code: Select all
select * from table where key=...Code: Select all
select * from table where key=.. FOR UPDATE NOWAIT(In short)
Code: Select all
try
starttransaction
lockmode=lmlockImmediate
Checkmode=cmException
query.lock
except
showmessage('Record in use by other session');
end;
The second session doesn't see a row lock? No message appears.
I see rowlevel locks in Oracle, but not on the table defined in the query...??
(If the first session issues the rowlock I see rowlocks on record(s?) in a different table as supposed.
If the second session issues a rowlock I see more rowlocks, also in a different table as supposed. Sometimes even different from the (wrong) table mentioned by session 1???)
Is this the right method doing so?
If not how to achieve this functionality? ((I can't find an definite answer in the ODAC help or forum.))