[VXCMD] Record Locks

Robert Brenstein rjb at rz.uni-potsdam.de
Mon Aug 23 11:54:15 CDT 2004


>On 8/19/04 6:37 AM, "Bobby" <bobby at inentertainment.com> 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? 
But then shouldn't the new function be

Cursor_GetAllRecords( curs , [FromRec], [MaxRecords],
         [fldDelim], [recDelim])

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

>
>     Cursor_Free( curs )
>

Is this supposed to be a replacement for the current Cursor_Remove()? 
I think that Remove sounds better (Discard could be an alternative).

Robert Brenstein


More information about the Valentina mailing list