Trying to understand record locks
James Kleinschmidt
jkleins at shentel.net
Fri Oct 17 15:45:30 CDT 2003
No, I have two different cursors theCur and theNewCur. "theCur" is
stored in a global variable and then I make a new cursor "theNewCur".
The only difference in the two scenerios is that with the first I just
stored the locked cursor directly and then made theNewCur and with the
second I stored an unlocked cursor and then immediately replaced it
with a locked cursor. The results, its seems to my thinking, should be
the same, since the locked cursor is the currently stored cursor in
both cases.
The second cursor "theNewCur" should fail both times as it is trying to
access locked data. It does fail the first time. But in the second
instance the cursor does not fail. It allows me to put a cursor into
theNewCur and update records in it even though I have a valid cursor
with read/write locks in a different global variable. I hope that was
clearer.
Thanks,
JIm
On Friday, October 17, 2003, at 02:38 PM, Ruslan Zasukhin wrote:
> on 10/17/03 17:10, James Kleinschmidt at jkleins at shentel.net wrote:
>
> Hi James,
>
>> In my testing I get a cursor (theCur) and store it in a global
>> property
>> with read/write locks. This is a good cursor
>> I then try to get another cursor (theNewCur) with the same data and it
>> fails.
>
>> This seems right because that data is locked, right. But now it gets
>> confusing.
>
> -----
>
>> If I get the same cursor (theCur) and store it in the global variable
>> with no locks and then repeat the exact same select with read/write
>> locks, just as I did in the first test, and store it in the same
>> global
>> - theNewCur works fine and I can change the records in theNewCur
>> successfully like the locks are not there.
>
>> Am I missing something real obvious here or should I be doing
>> something
>> differently?
>
> I do not understand what wonder you.
>
> You have assign second cursor to the same variable.
> So first cursor is deleted.
>
> You have now only one cursor with ReadWrite locks
> So of course you can change records in this second cursor.
>
> --
> 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
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list