F
Franz Gsell
Hi together,
I have got a DataSet which is bound to a XmlDataDocument object. Now I
want to call LoadXml() multiple times to populate the DataSet object.
For better understanding here are some code fragments:
DataSet actDataSet = new DataSet();
actDataSet.ReadXmlSchema("MySchema.xsd");
XmlDataDocument actDocument = new XmlDataDocument(actDataSet);
public void SomeEventFired(XmlNode dataNode)
{
// Populate the DataSet
actDocument.LoadXml(dataNode.OuterXml);
}
So now my problem is that on the first call of SomeEventFired everything
is fine. But when I call SomeEventFired once more than I get an
InvalidOperationException (Cannot load XmlDataDocument if it already
contains data. Please use a new XmlDataDocument.)
So how can I populate my DataSet multiple times with different Nodes??
Kind regards,
Markus
I have got a DataSet which is bound to a XmlDataDocument object. Now I
want to call LoadXml() multiple times to populate the DataSet object.
For better understanding here are some code fragments:
DataSet actDataSet = new DataSet();
actDataSet.ReadXmlSchema("MySchema.xsd");
XmlDataDocument actDocument = new XmlDataDocument(actDataSet);
public void SomeEventFired(XmlNode dataNode)
{
// Populate the DataSet
actDocument.LoadXml(dataNode.OuterXml);
}
So now my problem is that on the first call of SomeEventFired everything
is fine. But when I call SomeEventFired once more than I get an
InvalidOperationException (Cannot load XmlDataDocument if it already
contains data. Please use a new XmlDataDocument.)
So how can I populate my DataSet multiple times with different Nodes??
Kind regards,
Markus