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.
Ebook Download
View all
Learn
View all
F11Research & Development, LLC