cursor/api

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Feb 10 02:37:59 CST 2005


On 2/10/05 1:42 AM, "Ralf Sander" <ralf at end-if.de> wrote:

> Api way:
> The new api way is much more flexible, Adding records to a found set,
> sorting etc.
> But:
> Because its all based on RecIDs, which will be reused, does this work
> in an multiuser invironment?

1) I see only one problem:

    API way do not have yet record locks.
    I think we need add yet Vtable.Lock()  .Unlock()  functions.

Ralf, it is not good idea do not use locks in the mutli-user environment.


2) actually Cursor also is based on RecID, just you not see this.
    and cursor can/should lock selected records.

 
> Example:
> 
> mDataBase.mPerson.Field("string_fld").FindContains("aa") returns a Vset
> with 10 records, which I use for displaying.
> If I delete the first record with mDataBase.mPerson.DeleteRecord, the
> iterator still loopes 10 times returning the value of record 2 for the
> deleted record 1.

In loop you should do safe check

    if( Table.RecordExist( recID ) )


> Or will I have to create my own structure to ensure not to get deleted
> records or records with reused recids?

no

-- 
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-beta mailing list