Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML string from data
Message
De
19/11/2003 02:45:24
 
 
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
00851293
Message ID:
00851295
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Joe,

I'm not really sure what you're asking here. Do you want to know how to convert your DataSet to an XML string? It's simply
DS.GetXML()
To read an XML string into a DataSet, do something like this:
Dim sr As StringReader  = new StringReader(XML)
DS.ReadXML(sr, XmlReadMode.InferSchema)
If I haven't exactly answered your questions, it's because I didn't exactly know what you were asking. But, maybe this will help anyway. <g>

~~Bonnie


>I want to create an XML string from data. I need to be able to store the contents of the string in a database. Everything I have seen talks about xml files... I don't want the IO I just want the data. So in a nutshell, SQL statement or dataset to fully qualified XML string. And how would I read that XML string into as dataset to bind to a control later?
>
>
    Dim DS As DataSet
>    Dim MyConnection As New SqlConnection
>    Dim MyCommand As SqlDataAdapter
>    MyCommand = New SqlDataAdapter(strSQL, SqlCn)
>    DS = New DataSet("MyCartDS")
>    MyCommand.Fill(DS, "Cart")
>' At this point my DS is happy and busting at
>' the seams with data ..
>I dont know how to go forward without a filetype IO :(
>
>My thanks in advance,
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform