Re: Update cursor showing error 244 (row locked) even when row is not returned
Posted in 2003
Hi Phil.
Just suggestion.
Your lock mode of table is PAGE lock ?
Check your lock mode as bellow.
% oncheck -pt stores7:customerTBLspace Report for stores7:tsutoo.customer
Physical Address 1034f6
Creation date 06/19/2003 11:01:28
TBLspace Flags 801 Page Locking
This is Page lock.
After executing SQL alter table [alter table customer lock mode(row);]
% oncheck -pt stores7:customerTBLspace Report for stores7:tsutoo.customer
Physical Address 1034f6
Creation date 06/19/2003 11:01:28
TBLspace Flags 802 Row Locking
Regards.
--
Tsutomu Ogiwara from Tokyo Japan.
ICQ#:168106592
>From: z28_onyx@yahoo.com (Phil)
>Reply-To: z28_onyx@yahoo.com (Phil)
>To: informix-list@iiug.org
>Subject: Update cursor showing error 244 (row locked) even when row is not
>returned by query
>Date: 15 Jul 2003 21:09:12 -0700
>
>Hi everyone,
>We have a requirement here that we should be able to run two instances
>of the same program to fetch rows from a table and get the data. Once
>done they are to be deleted. Now we are using cursors to get the row.
>The reason why they want to go for two instances is to speed up
>things. Now the problem here is that when one instance picks up row 1,
>we don't want the second instance to pick up row 1. Hence we used an
>updatable cursor. The first instance update cursor would say (select
>from table where id = 1) and the second instance would say (select
>from table where id = 2). These rows being returned are totally
>different subsets.
>Catch here is that when the first instance runs..it returns all rows
>with id 1. The lock mode is set to not wait. Now when the second
>instance runs, it tries to get rows with id 2 but the error 244 (row
>is locked physically).
>
>I could understand this problem if the second instance was trying to
>get rows with id 1. but this has left me puzzled.
>
>I am using Informix for C++ classes to do this. The ITCursor class
>namely.
>
>Any pointers?
>
>Thanks in advance. I know that this is one of the lists where we have
>some really cool folks who know the stuff..
>
>Kind Regards
>Philip
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
sending to informix-list