AW: AW: [VSDK] VDK_Cursor::Update() broken?
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Jan 7 20:53:51 CST 2004
on 1/7/04 7:42 PM, Florian Bogeschdorfer at fb at memedia.de wrote:
>>>> Also is your cursor related to more than one table? Like SELECT something
>>>> FROM table1, table2 WHERE condition??
>>>>
>>>> In this case Valentina currently will not support writing. Is it locked
>>>> automatically
>
>>> The problematic cursor is on 1 table only. My other 2
>>> cursors, which works perfectly may use more than 1 table. Are
>>> you sure about what you are saying?
>>>
>> Absolutely. In Valentina 1 you can not write to a cursor that joins any
>> tables, at least not if you are trying to write to both tables but I think
>> generally. These cursors are always locked. Since a locked cursor might
>> prevent other cursors from saving the data, could it be that you
>> accidentally "locked" some data in a different cursor?
> If this is true, then why the comments on kNoLock in "FBL.h" says: "Cursor
> do not set locks and ignore locks of others."?
>
> Ruslan what is the official rules about this?
Let me explain.
1) class Cursor have function
bool IsReadOnly()
This functions returns TRUE in case you make cursor as JOIN of tables,
Or use DISTINCT, or GROUP BY.
This have NO any relation to RECORD LOCKS.
This is related to fact that RESULT TABLE cannot be modified.
And this is not limit of Valentina 1.x.
This is BIG FACT.
There are some exceptions when JOIN cursor still can do updated.
A) Valentina 1.x right now will allow to update cursor on FEW tbales, if
they are related as 1 : 1.
B) in the future it is possible to allow update on field of cursor that was
SELECTED from MANY table of join.
This is why was added this function, so you can always ask if cursor can be
updateable. Taking into account point b) in future this should be changed as
IsReadOnly() for each field of Cursor.
---------------
2) as I understand, this is not a problem of Eric now,
Because he use always NoLock, yes?
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list