Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML from Sql
Message
De
20/05/2003 13:14:55
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
XML from Sql
Divers
Thread ID:
00790622
Message ID:
00790622
Vues:
57
What would be the best way to to get an xml string from a sql query. I know I can use the DataSet.GetXml(), but it does not include schema...

I also found I could use:
DataSet ds = new DataSet(); 
StringWriter sr = new System.IO.StringWriter();

ds.WriteXml(sr, System.Data.XmlWriteMode.WriteSchema);
strXml = sr.ToString()
which returns the string the way I want it, but I am still going through all the overhead of a DataAdapter, DataSet, StringWriter...

Is there a better way?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform