NoLocks // 1.9.8b10 adoption of record locks. Feedback

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jul 4 16:11:39 CDT 2003


on 7/4/03 0:19, jda at jda at his.com wrote:

>> Hi Guys,
>> 
>> In case somebody will adopt project for new syntax of SqlSelect() and get
>> SUCCESS or FAILURE, please notify me.
>> 
>> Especially in case of success :-)
>> 
> 
> I have made extensive changes in my RB project (probably 100 or more
> SQLSelects) and so far (now that new VCursor works) have mostly
> success. I'm running into some problems with the way some of my code
> behaves, but so far I've been able to restore normal behavior by
> playing with the ReadOnly/ReadWrite status. (This is a local, BTW,
> not VServer)
> 
> I'm still be bit unsure of what NoLocks is doing with ReadOnly and
> ReadWrite. If I set the cursor to ReadOnly, any other cursor that is
> ReadOnly can access the record, right?

yes

> And if one cursor is ReadWrite, no other cursor can access those records until
> the cursor is nil'ed, right.

yes

> So what does NoLocks do?

Cursor with NoLocks simply IGNORE all above rules.
As result even if one cursor lock some records, never mind how, RO or RW,
Second cursor with NO LOCKS parameter still will be able use that records.

YES!!! DANGER WAY. 
Should be used very rarely and carefully, Better for reading only.

> And if one record is in a ReadWrite cursor, and an attempt is made to
> create another cursor that contains 9 "free" records and that one
> "locked" record, what happens  -- are 9 records returned? Or is the
> new cursor empty (nil).

You will get nil cursor and ERROR: CannotSetLock.

> I'll have a fuller report after I get to play with this over the
> holiday weekend (4th of July here in the States).

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