Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting TableNames from Stored Proc
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00882930
Message ID:
00883306
Vues:
12
Use the DataAdapter's TableMappings collection to control the names of the DataTables that the DataAdapter will fill or create. So, if your stored procedure will return customer and order information, you would use code like the following:

MyDataAdapter.TableMappings.Add("Table", "Customers")
MyDataAdapter.TableMappings.Add("Table1", "Orders")
MyDataAdapter.Fill(MyDataSet)


How can I guarantee that Customers will always be Table and Orders will be Table1?

If I'm counting on the order in which the SQL Statements are executed what's the difference if I just do this?

MyDataSet.Tables[0].TableName = "Customers";
MyDataSet.Tables[1].TableName = "Orders";
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform