Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML To Dataset
Message
De
18/03/2008 16:29:29
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01303148
Message ID:
01303158
Vues:
16
>>>I am passing a dataset as XML to a web service, which then passes it to a data class where it will be 'onverted'
>>>back into a data set.
>>>
>>>1) How to I get the XML back into a data set?
>>>
>>>2) How do I update the DB from the dataset?
>>
>>1) Look at the DataSet.ReadXML method.
>
>Actualy I found that, but it throws an exception "Illegal characters in path" error.
>
>[UPDATE] Looks like ReadXml is for reading from a file. I'm passing an XML string to
>this method and want to put it back into a dataset.
>
>See this http://www.java2s.com/Tutorial/CSharp/0540__XML/LoadXMLtoDataSet.htm

There are several overloads. Maybe the one reading in a stream is what you are looking for?

>>
>>2) I usually loop through the rows in the DataSet and save them one-by-one using normal ADO.NET methods. I know there are other fancier ways to do it with DataSets, but I am mostly a business objects guy so I don't know those offhand.
>
>Ok
>
>>
>>3) You almost had me look up "onverted" in a dictionary before I realized the typo...
>
>Doesn't everyone 'onvert' their data?
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform