Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data from XML not being read to dataset
Message
From
12/08/2010 15:44:01
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Data from XML not being read to dataset
Environment versions
Environment:
VB 9.0
Miscellaneous
Thread ID:
01476381
Message ID:
01476381
Views:
112
When I read a XmlDocument into a DataSet, the structure defined in the schema is created but the datarows are not being populated.
            Dim XMLreader As StringReader = New System.IO.StringReader(XMLstring)
            Dim DS As DataSet = New DataSet
            DS.ReadXml(XMLreader, XmlReadMode.ReadSchema)

            Dim dr As DataRow = DS.Tables(0).Rows(0)     ' <= error: "there is no row at position 0"
The rows collection has a count of 0. I know there around a hundred rows in the Xml string.

I googled around, but nearly all the examples are the same or similar to one I have here.

I would not mind if the xml string is flawed. but no error or exception is generated. The dataset's HasErrors reports false.

Any help would be great.
Greg Reichert
Next
Reply
Map
View

Click here to load this message in the networking platform