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 > Locking Strategy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 11:46
Dirk Loenne Dirk Loenne is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
Smile Locking Strategy

Dear Friends,

may be that my problem has been discussed previously, but I can't find any matching thread. So please be lenient with me.

I'm developing a VB.Net multiuser front end handling data provided by an Informix DS 9.30. Both communicate over the oledb driver which comes along with csdk 2,80.

Now to my problem: I cannot find any substitute for the promotable lock which is easy to set in 4GL. But still I would very much appreciate to set a lock on selected rows which are only possibly going to be updated. With that any other user would be able to still have a glance at the locked data. I tried my luck with dirty read isolation level and lock mode row, but transactions are no substitute for locks since they work only with update, insert or delete statements.

How can I set a shared lock on selected (!) rows outside any transaction frame or is there something wrong with my strategy?

Many many thanks in advance
Dirk
Reply With Quote
  #2 (permalink)  
Old 07-07-04, 08:37
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

Test if level lock of table is (row or page).
I suggest that alter tables a lock mode (row).

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 07-07-04, 10:07
Dirk Loenne Dirk Loenne is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
Gustavo,

yah, I tried it lock mode row - without success.

In my eyes the first problem is that any update or delete statement results in a lock on the entire table. Of course the IDS has to rebuild the index and consequently locks it. But in that case I have to minimize the time for any transaction. That's why transaction do not help locking selected rows (which are only promoted to be updated). I'd like to use pessimistic locking.

The second thing is that I do not have an update cursor. So how can I put a shared lock on selected rows but keep the rest of the table unlocked? any ideas?

Thanx
Dirk


Quote:
Originally Posted by gurey
Hi,

Test if level lock of table is (row or page).
I suggest that alter tables a lock mode (row).

Gustavo.
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