Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet read from XML what's the table name
Message
Information générale
Forum:
ASP.NET
Catégorie:
.NET Compact Framework
Divers
Thread ID:
00795905
Message ID:
00795938
Vues:
15
Hi Jon,

You can get the name of the DataTable by using the TableName property.
private void GetTableNames(DataSet myDataSet)
{
   // Print each table's TableName.
   foreach(DataTable t in myDataSet.Tables){
      Console.WriteLine(t.TableName);
   }
}
>My understanding of datasets some days.... especially with compact framework
>
>I get the XML with an inline schema (VFP8) from a webservice. This is done with ReadXml and I can use this in displaying textboxes and grid, but I fall short on understanding where one derives the table name in for example myDataSet.Tables[????] when it comes from a webservice. I am using myDataSetTables[0].DataView as DataSource for a DataGrid, but because I need this for DataGridColumnStyle MappingName I am at a loss.
>
>Here's part of the code.
>
>string xml = lu.ItemXML;
>
>this.ds = new DataSet();
>
>this.ds.ReadXml(new XmlTextReader(new StringReader(xml)), System.Data.XmlReadMode.ReadSchema);
>
>this.dgItemListing.DataSource = this.ds.Tables[0].DefaultView;
>
>Thanks
>Jon
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform