-
Oo
hi there!
i am trying to understand how this would work in C#
I have a Table class and a Field class
each table objects has many field objects
I can create a table object (I think) by extracting schema info from SQL and constructing the fields with things like:
field name
data type
max length of Chars
fair enough
but how do i tell it that the table that has been created will have the fields that it should have? if you see what i mean?
ok once i have made this field object, how do i store it? where do i store it? in my "Main" class? or in my Field class where the constructers are?
Thanks!
-
-
1 Attachment(s)
You will need to create a Table class, a Column (or Field) class, and a ColumnCollection class that holds Column objects.
I have some code that is close to what you need. It is pretty bare, and I think the loading of the columns will need to be worked a bit to work, but the main structure is there for you to get the concepts...
I attached the code.