Filling DataSet?

Hello, I need to read a XML file, I've generated a typed DataSet with xsd.exe, but I don't know how to fill the DataSet:



DataSet1 ds = new DataSet1();
ds.ReadXml("file.xml");

 


but the dataset seems to be empty, what am I doing wrong

Also, I can't find a way to append a TableAdapter to the scheme from the designer

I'm using Beta 2 obviously.


Answer this question

Filling DataSet?

  • BadrK

    I didn't, and right now I need the output the content in a console application... plus I really want to know how to iterate the dataset.
  • bpervi

    How stupid can I get

    New XMLs weren't pointing to the XSD scheme, thats why they weren't properly readed...

    Sorry *embarassed*

  • Newborn

    Hi,

    did you try this

               

    DataSet ds = new DataSet();
                ds.ReadXml("test.xml");
                dataGridView1.DataSource = ds.Tables[0];

     


  • Filling DataSet?