FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


vb.net class as property of another class - FIXED





Marcuzzo
Hi guys,
I've been working on a schoolproject for a while and I'm kind of stuck.
the project is a vb.net project where I need to store data in a mssql database and we need to use a class per table.
now, i've normalized my database and let's say I've got a class named "clsItems" and a class named "clsContacts".

the Items table looks somewhat like this ( the sql syntax is not correct, it is just to give you an idea of it's structure)
Code:
Table Items(
id integer,
name varchar,
contactId integer
)

and my Contacts table
Code:
Table Contacts(
id integer,
name varchar,
address varchar,
ect....
)


my classes look like

Code:
public class clsItem

Private _id As Integer
    Public ReadOnly Property Id() As Integer
        Get
            Return _id
        End Get
    End Property

'other properties

    Private _contact As clsContacts
    Public Property Contact() As clsContacts
        Get
            Return _contact
        End Get
        Set(ByVal value As clsContacts)
            _contact = value
        End Set
    End Property

end class


my clsContacts class looks pretty much the same with an id, telnr, addres, ect...

my question (frustration) is that my Contacts property doesn't show up in clsItems Object
infact it will tell me that Contact is not a member of clsItem

can anybody point me in the right direction please

EDIT: Nevermind, I'm an idiot, I had another class clsItems in my project and wasn't using the correct classes that were stored in another project Brick wall
Related topics
Programming
HTML Help
visual basic.net
VB.NET school
VB 6 and vb.net tutorials
PHP VS ASP
VB.NET and SQL Server
VB.NET learning
Need vb.net or Flash ActionScript Help!
VB.Net Or C#
A confusion with C# and VB.NET...
Java
OMG! vb.net without connection to server option?
What is your recommended free VB.net decompiler?
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.