Object persistance 
Author Message
 Object persistance

Hi everybody

I got a question concerning the Object persistence.

Actually i just want to create an object that holds an Variant variable
(Array of Variants) that is accessibly by multiple applications.

I didn't get very far because the Property-Bag doesn't accept any arrays and
it is too complicated to divide the array into pieces.

Thanks for your help

Joerg



Mon, 01 Apr 2002 03:00:00 GMT  
 Object persistance
Joerg,

Quote:
> I didn't get very far because the Property-Bag doesn't accept any arrays
and
> it is too complicated to divide the array into pieces.

How could it be too complex to traverse and save based on type?

Kathleen



Mon, 01 Apr 2002 03:00:00 GMT  
 Object persistance

Quote:
> > I didn't get very far because the Property-Bag doesn't accept any arrays
> and
> > it is too complicated to divide the array into pieces.

> How could it be too complex to traverse and save based on type?

Because the Array consists of multiple arrays each containing an array
again. I know, that it's still possible to parse that, but i'm looking for a
more efficient way


Mon, 01 Apr 2002 03:00:00 GMT  
 Object persistance
Joerg,

It seems like a fairly straightforward recursive problem. Untested pseudo
code

    Public Sub StoreArray(xArray as variant)
        Dim i as integer

        for i = lbound(xarray) to ubound(xarray)
            select case vartype(xarray(i))
                case vbempty
                    StoreEmpty
                case vbnull
                    StoreNull
                case vbstring
                    StoreString x(i)
                case vbinteger
                    StoreInteger x(i)
                 ' all other required cases
                case vbarray+vbvariant
                    StoreArray x(i)
                case else
                    ' Raise error, you forgot something
            End select
        next
    End sub

Now these "Store" subs are probably going to have to indicate something
about what is being stored so that you can unpack in a similar manner.

Kathleen



Tue, 02 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Object Persistance/Serialization

2. Object persistance

3. Object Persistance and Focus

4. Object persistance without the PropBag?

5. Object Persistance to DB

6. someone please explain object persistance

7. Persistance of objects

8. Problem with Persistance of object type between apps

9. PublicNotCreatable object collection persistance

10. Object property persistance

11. Custom complex properties persistance

12. .NET Persistance

 

 
Powered by phpBB® Forum Software