Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data from XML not being read to dataset
Message
De
12/08/2010 15:44:01
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Data from XML not being read to dataset
Versions des environnements
Environment:
VB 9.0
Divers
Thread ID:
01476381
Message ID:
01476381
Vues:
115
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform