How to load multiple tables in a DataSet?

Try the below sample code to load multiple “DataTable” objects in one
“DataSet” object.


objCommand.CommandText = "Table1"
objDataAdapter.Fill(objDataSet, "Table1")
objCommand.CommandText = "Table2"
objDataAdapter.Fill(objDataSet, "Table2")

The above code shows two tables "Table1" and "Table2" in object ObjDataSet.

Nipun Tomar

Nipun Tomar is competent and experienced project leader & architect with 12 years of experience in managing multi-disciplinary teams of varying sizes and complex programs of work. Has the ability to build strong rela... Read more

https://www.c-sharpcorner.com/members/nipun-tomar2