G
Guest
Hi everyone,
When I click on Button1 than I load an xml file in a dataset.
The dataset table contains 5 rows
When I click on Button2 I want to write the dataset back to xml.
But it contains no data.
The error is that table[0] is null
What is the cause and hwo can I work arround it?
Thanks a lot,
Filip
private void Button1_Click(object sender, System.EventArgs e)
{
AdressenDataSet.ReadXml("c:\\Lessius\\adressen.xml");
int i = AdressenDataSet.Tables[0].Rows.Count;
}
private void Button2_Click(object sender, System.EventArgs e)
{
int i = AdressenDataSet.Tables[0].Rows.Count;
AdressenDataSet.WriteXml("c:\\Lessius\\adressen.xml");
}
When I click on Button1 than I load an xml file in a dataset.
The dataset table contains 5 rows
When I click on Button2 I want to write the dataset back to xml.
But it contains no data.
The error is that table[0] is null
What is the cause and hwo can I work arround it?
Thanks a lot,
Filip
private void Button1_Click(object sender, System.EventArgs e)
{
AdressenDataSet.ReadXml("c:\\Lessius\\adressen.xml");
int i = AdressenDataSet.Tables[0].Rows.Count;
}
private void Button2_Click(object sender, System.EventArgs e)
{
int i = AdressenDataSet.Tables[0].Rows.Count;
AdressenDataSet.WriteXml("c:\\Lessius\\adressen.xml");
}