Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

to Lock a record in reading

0 views
Skip to first unread message

rleb...@enginfo.it

unread,
Jan 17, 2003, 5:13:38 AM1/17/03
to
Hi,

while reading a record , with SQL QUERY, how can I lock it for a future Update ????

I try with : ' SELECT * FROM [TABLE_NAME] WHERE [...] FOR UPDATE '

but it doesn't lock the record !!!!!

Thanks and sorry for my language !!

Rino

PM (pm3iinc-nospam)

unread,
Jan 17, 2003, 10:57:14 AM1/17/03
to
what version of db2?
what platform?
what isolation level?
auto commit on? (should be off)

SELECT * FROM [TABLE_NAME] WHERE [...] FOR UPDATE WITH RS

In your case it probably locks the record but you're not fast enough to see
it.

PM

boco...@ca.ibm.com

unread,
Jan 17, 2003, 10:04:48 PM1/17/03
to rleb...@enginfo.it
What platform and what is your isolation level?

Sure it is locking the row! The issue is what isolation level are you? Furthermore, do
you mean not U locking, but is S locking instead? Or, you don't know? Running at an
upper isolation level is not necessarily the right answer. Can you answer the above
questions?

0 new messages