V4WS 1.11 Problem with kReadWrite following kReadOnly lock

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jan 20 01:43:08 CST 2008


On 19/1/08 3:05 AM, "Steven Ronald" <stevenrt39 at yahoo.com.au> wrote:

Hi Steven,

> *** The problem ***
> 
> When I try this:
> 
> cursorRef_Csoft=valSQLSelect("SELECT RecID FROM C
> WHERE c1='" & c1 & "'", 1, 2, 2);
> cursorRef_Csoft=valSQLSelect("SELECT RecID FROM C
> WHERE c1='" & c1 & "'", 2, 3, 2);
> 
> I get the "cannot set record lock" error. Why? The
> first cursor is read only, so why should it prevent
> the second cursor from locking the record

This is correct behavior. All dbs do it.
And 1.x, 2.x and 3.x also do it.

This is because FIRST cursor have set READ lock.
This means that user of this cursor HOPE and BELIVE that if he read value of
Nth record, now and later and later it always get the same consistence
value. 

This is why we cannot allow other cursor/user to change that READ ONLY
locked value.


If you do not care that user1 see changes from user2 then just use NoLocks
mode.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list