[VXCMD] Record Locks

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 23 13:02:57 CDT 2004


On 8/23/04 12:54 PM, "Robert Brenstein" <rjb at rz.uni-potsdam.de> wrote:

>>>  Ruslan we keep getting with one particular company record locks when we are
>>>  not setting any kind of record locks. What else would cause a 363 error to
>>>  occur.  We use SQLSelectRecords and SQLSelect with the "NoLocks" option.
>> 
>> Hi Robert,
>> 
>> We have declaration
>> 
>> 
>>     DataBase_SQLSelectRecords(
>>         dbRefOrName, SQLstring,
>>         [FromRec], [MaxRecords],
>>         [fldDelim], [recDelim] )
>> 
>> 
>> Valentina in this function build cursor using default params:
>> 
>>     kClient, kReadOnly, kForwardOnly
>> 
>> 
>> 
>> We have 2 choices now:
>> 
>> 1) We add to this function 3 additional parameters.
>>     IMHO it will be too much parameters then for it.
>> 
>> 
>> 
>> 2) second way.
>> 
>>     instead of this functions you can use 3 steps ways
>> 
>>     curs = DataBase_SQLSelect(
>>             dbRefOrName, SQLstring, [Location], [LocksType], [Direction] )
>> 
>>     Cursor_GetRecords( curs )   -> this is what you want
>> 
>> So what you think?
>> Should we add 3 more parameters to above function ?
>> 
> 
> So you are suggesting, Ruslan, to get rid of the SqlSelectRecords but
> instead of provide a new function that allows to fetch all records?

No. 

    We have right now DataBase_SQLSelectRecords() which can return you N
records without cursor creation and killing. It do this internally.
    And we have right now Cursor_GetRecords() which do the same, but you
must create and kill cursor explicitly.

Bobby have use NoLocks always, but stil get 363 error.
To resolve this, he can use second way.


> But then shouldn't the new function be
> 
> Cursor_GetAllRecords( curs , [FromRec], [MaxRecords],
>        [fldDelim], [recDelim])

We already have it, Robert!

> I would suggest to say "all" since the single "s" of plural is easy to miss.


> The only consideration is that this new approach requires 3
> subsequent calls to the external.

Exactly! and little more coding.

> The overhead is too small to worry about it too much but the beauty of a
> single GetRecords is that one does not have to remember to remove the cursor.
> But I guess we can get used to it.

To be able use single GetRecords() we then must add 3 parameters to it
To control record locks. This is my question. Should me do this ?


>>     Cursor_Free( curs )
>> 
> 
> Is this supposed to be a replacement for the current Cursor_Remove()?

I could make mistake in name. Ignore this. I show idea.

> I think that Remove sounds better (Discard could be an alternative).

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