There are different ways of doing this, noen of them "simple". Here's one
way, involving a separate DataTable object.
Dim northwindConnection As New SqlConnection("...")
Dim firstDataSet As New DataSet
Dim secondDataSet As New DataSet
Dim productsDataTable As DataTable
Dim firstAdapter As New SqlDataAdapter("SELECT * FROM Customers",
northwindConnection)
Dim secondAdapter As New SqlDataAdapter("SELECT * FROM Products",
northwindConnection)
firstAdapter.Fill(firstDataSet)
secondAdapter.Fill(secondDataSet)
productsDataTable = secondDataSet.Tables(0).Copy
productsDataTable.TableName = "Products"
firstDataSet.Tables.Add(productsDataTable)
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Glenn Wilson said:
I have 2 datasets that are connected from 2 different dataadapters and
sources, I need to copy a DataTable from one dataset to another. Is there a
function to clone a dataset