Tech Off Thread

7 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

XSD -> strongly-typed dataset

Back to Forum: Tech Off
  • User profile image
    Tensor

    Anyone know how I should go about taking an XSD and using it to create a strongly-typed dataset at design time?

  • User profile image
    Lee_Dale

    Just use the XSD command line tool or wizards within the IDE?



  • User profile image
    hardball

    xsd.exe /c /d /l:cs file.xsd

    /c makes classes
    /d makes the dataset

    xsd /? for more

  • User profile image
    Tensor

    That would be it! Thanks.

  • User profile image
    jdewalt

    You can do it in the designer as well as from the command line. 
    Right click and choose generate dataset.

    Or go to the drop down menu called schma on the toolbar when in shema design mode and choose generate dataset.

    From that point forward whenever you change your xsd and then save a dataset will be created for you.

  • User profile image
    Tensor

    Thanks - but it appears you can not do that in vs2005. It is there in 2003 though This seems odd -  is it a feature thats been removed between 2003 and 2005?

  • User profile image
    jdewalt

    Not sure, I don't have 2k5 in front of me.  I was under the impression it was even easier with 2005, and that when you changed the .xsd in 2k5 it would automagically refactor the code calling it so you can change type names without breaking code. I'll check it out later tonight and see if i can get back to you.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.