Hi,
I want to add more than one table in dataset. how i can please suggest me.
For example
Gridview1.datasource= ds.table[2];
It mean dataset contain three table reference. so provide me code through which i can add more than one table reference in dataset.
How to add mutiple table Reference in dataset
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Veerabhadram Dhodla14 reputationPosted Nov 6, 2012, 1:00 AM EST
Now bind your data set to that Stored Procedure. Automatically your dataset will get 3 tables
Hemant SrivastavaRank #581 · 4.2K reputationPosted Nov 12, 2012, 9:31 AM EST
e.g.
DataSet customerOrders = new DataSet("CustomerOrders");
DataTable ordersTable = customerOrders.Tables.Add("Orders");
DataColumn pkOrderID =
ordersTable.Columns.Add("OrderID", typeof(Int32));
ordersTable.Columns.Add("OrderQuantity", typeof(Int32));
ordersTable.Columns.Add("CompanyName", typeof(string));
ordersTable.PrimaryKey = new DataColumn[] { pkOrderID };