Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a DataTable from one DataSet to another DataSet
Message
 
To
13/10/2006 12:34:37
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01161735
Message ID:
01162009
Views:
21
Bonnie,
Merge that is the ticket. Thanks.

Einar

>>
>>Dim SampleTable As DataTable
>>SampleTable = dataSetA.SameTable.Copy()
>>dataSetB.SameTable.Dispose()
>>datasetB.Tables.Add(SameTable)
>>
>
>John, the Dispose won't work, but you can do it with a Remove().
>
>Einar, try using the Merge method. Something like this:
>
>
>datasetB.SameTable.Clear();
>datasetB.SameTable.Merge(datasetA.SameTable);
>
>
>~~Bonnie
>
>
>
>>
>>HTH
>>John
>>
>>>I have two different datasets: datasetA and datasetB
>>>
>>>Both datasets contain the same table SameTable.
>>>
>>>How do I copy/duplicate the table from datasetA to datasetB?
>>>
>>>This does not work: datasetB.SameTable = datasetA.SameTable
>>>
>>>Thanks,
>>>Einar
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform