update in set

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jan 15 22:08:51 CST 2005


On 1/15/05 8:04 PM, "Olivier" <vidal_olivier at yahoo.fr> wrote:

> Hi,
> 
> I have one set.
> I want to UPDATE, to add or to delete a record.
> How can it be done?
> I do not see methods (as in cursors) in the sets.

right

> It is necessary to use directly the API methods (table1.field
> ("string1") .setstring (" xxxx "), table1.updaterecord () ) ?

Right!

> But in that case the set save the modifications at once?

Oliver, set this is just AN ARRAY OF Integer numbers!
This is very very simple abstraction.

You need get an Iteger value from Set, this is RecID.
So

    dim recid as Integer
     
    for I = 1 to count

        recId = set.ItemIt( I )

        Table.RecID = recID

        // Now you can do Update or Delete. Or read values of this record

    end if

> Which is the difference between setIterator.value and arraySet.ItemAt ?

No difference.

* Just ArraySet.ItemAt() allow you work with ArraySet without iterator.

* But for BitSet there is no itemAt(), and to get item of bitset you MUST to
work with Iterator.

* Iterator is an abstraction that allow you work with both, BitSet and
ArraySet and the same way.

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