Results 1 to 3 of 3

Thread: Oo

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    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!

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773
    no one knows?

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width