Results 1 to 3 of 3

Thread: Populate objects from dataset thru reflection

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Post Populate objects from dataset thru reflection

    Hi all,

    I need to populate the objects defined in a config file from a dataset using reflection. The config file will have the field information for the objects. Can anyone tell me how to go about it? Thanks!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Populate objects from dataset thru reflection

    Can you be a bit more specific? What exactly does the config file contain? Are you saying that there are no actual existing types that you can create instances of, but rather that you want to create a type on the fly with properties that correspond to entries in the config file?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Re: Populate objects from dataset thru reflection

    You are correct.

    Actually I have to generate an XML feed. I have an XSD schema which is converted to a serializable VB class using XSDObjectGen or Svcutil tool. The data which is in the form of a dataset is mapped to the XSD object. The XSD object is finally serialized to generate the final Xml document. What I am trying to do is have a config (XML file) define the XSD objects (so that later on any new objects can be added without any major changes). Also, since the dataset has multiple records I am thinking of populating the XSD class objects from dataset using reflection.

    Thanks for the response!

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