Killing the Cursor that Wouldn't Die

Chuck Pelto cbpelto at pcisys.net
Tue Jan 9 03:47:43 CST 2007


Morning Ruslan,

I found the problem. It was VCursor variable in another window that  
was retaining the lock. Killing it as well as killing the original  
did the trick.

Chuck



On Jan 7, 2007, at 2:35 AM, Ruslan Zasukhin wrote:

> On 6/1/07 5:56 PM, "Chuck Pelto" <cbpelto at pcisys.net> wrote:
>
> Hi Chuck,
>
>> Greetings & Happy New Year,
>>
>> I've got a bit of a problem.
>>
>> I'm getting a 'record is locked' error when I try to find records
>> related to another record.
>>
>> System tells me the record I'm looking for is 'locked'.
>>
>> The record is being found with a RW SQL call.
>>
>> It was found earlier. So I figured I needed to do a NL SQL call on
>> the same search criteria in order to unlock it before trying to find
>> it again. [Note: This has to do with changing views in RB, going from
>> FORM view to a LIST view and then back to a FORM view of the record I
>> was looking at before going to the LIST view of all records in the
>> found set.]
>>
>> So I do the NL SQL. And I do another RW SQL on the same search  
>> string/
>> criteria. Then I get the 'record is locked' error.
>>
>> Reading in the archives, I see where it is written that the cursor
>> will go away, and I presume the lock on the records as well, when the
>> cursor dies. What is the call?
>
> 1)
>
>     cursor = nil
>
> really must kill it, if you do not have other references to this  
> cursor.
>
>
> 2) another solution of your problem can be using kNoLocks when you do
> SqlSelect().
>
>> I've tried theCursor = nil.
>
> Right, this kill cursor and remove locks.
>
>> I've tried thisCursor = App.tDatabase.SQLSelect(sqlString,
>> EVCursorLocation.kServerSide, EVLockType.kNoLocks,
>> EVCursorDirection.kRandom).
>>
>> Neither will release the previously found set of records.
>
> This do not release first set of records, it just should ignore  
> existed
> locks.
>
>> How do you 'kill' the cursor so it 'dies'? I'm loath to use the .45
>> cal ACP on the computer....
>
>
> -- 
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list