If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Help On Lock Row

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-21-03, 07:41
tabacaru tabacaru is offline
Registered User
 
Join Date: Jan 2003
Posts: 9
Help On Lock Row

I use (and must use !) INFORMIX.SE. Is there any possiblity to LOCK A ROW ? I try (in a DATABASE with LOG) with SELECT ... FOR UPDATE but there is no lock ?
Can any one help me ?
Thanks a lot !
Reply With Quote
  #2 (permalink)  
Old 02-21-03, 09:45
eherber eherber is offline
Registered User
 
Join Date: Aug 2002
Location: Bonn/Germany
Posts: 152
You might use the cursor for update logic.

open the cursor;
begin transaction;
fetch the update cusror;

as long as you are in this transaction, the currently selected
row will have an U-lock. However if you go on to the next
row, this U-lock is released.
If you want the Locks to be permanent during the transaction
you have to execute a dummy-update on this row which
changes the U-Lock to an X-Lock.
This lock is held until you perform a commit or rollback work.

This is the SE logic as far as I remember. There is no concept
of isolation levels in SE, so you always have 'dirty read'.
__________________

Best regards

Eric
--
IT-Consulting Herber
WWW: http://www.herber-consulting.de
Email: eric@herber-consulting.de

***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On