[V4RB] ReadOnly Cursor doesn't need to lock records, does it?

Richard Altenburg valentina at brainchild.nl
Sun Jan 25 10:33:04 CST 2004


On 25-01-2004 02:40, "Dave Parizek" <dave at Parizek.com> wrote:

>>>  So does ReadOnly on a Cursor mean that all records in it are ReadOnly for
>>>  others?

> Yes, above is correct.  You will need use no locks, or not have
> simultaneous cursors.  It confused me a lot too.

It does not make much sense to me, because in 4D for example, when you
create something in a ReadOnly state, it means you won't write to it, so
others can happily go ahead and change the records.

I have to be aware of this difference all the time, so it will surprise me
some more in the future, I guess.

>>>  So I will try NoLocks, because I do need a Cursor that has all records in
>>  it, and several other cursors that handle other tasks.
 
> Yes, just keep in mind of course that data could be changing and the
> nolock cursors may not realize it.

OK, but in my program, which is single-user, I control any changes to this
particular data, so my software will refresh the NoLock Cursor whenever
appropriate. Thanks for warning me.

-- 

Richard Altenburg
Brainchild        <http://www.brainchild.nl/>
Picture Patrol    <http://www.picturepatrol.com/>



More information about the Valentina mailing list