Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

Define, how can we load multiple tables in a Dataset?
objCommand.CommandText = "Tab1"
objDataAdapter.Fill(objDataSet, "Tab1")
objCommand.CommandText = "Tab2"
objDataAdapter.Fill(objDataSet, "Tab2")

Above code shows how to load multiple Data Table objects in one Dataset object. Sample code shows two tables Tab1 and Tab2 in object ObjDataSet.
lstdata.DataSource = objDataSet.Tables("Tab1").DefaultView
In order to refer Tab1 Data Table, use Tables collection of Datasets and the Default view object will give you the necessary output.