Re: Array inside a collection
This looks like a problem of handling the classes.
I would recommend this
- create for every class (Prefix cls here) that is / would be used in a 1:n relationship in Database tables an additional collection class (I usually use the additional prefix col); you can let the class builder do that for you.
So then you have
- clsCompany
- clsContact
- ClsColContact (Collection class)
In the clsCompany you add
private m_ColContact as clscolContact
Public property get Contacts() as clscolContact
set Contacts= m_ColContact
end property
Public Property Set Contacts(byval vdata as clscolContact)
set m_ColContact = vdata
end property
Then you can fill a collection of the contacts somewhere in your code and
then pass it to your Company class with
dim ccompany as clscompany
dim ccolContact as clscolcontact
...
' add item to collection
colcontact.additem(name, phone, email)
....
' Pass to Company
set ccompany.Contacts = ccolcontact
or if you want to get the collection from the class
set ccolcontact = ccompany.Contacts
IMHO this is a much better way to handle the problem than working with arrays.
have a nice day
Patzer
_____________________________
Philo will never be forgotten