Microsoft
Software
Hardware
Network
Question : Populate a DataTable from another DataTable
I have a DataTable (dt) populated from a CrossTab query so I can not do this in SQL.
I need to change the DataType and ColumnName for certain columns.
I made a DataTable.Clone() (dtClone) of dt This of course is a empty table so I can can change the DataType and ColumnNames
Now how do I poulate dtClone from dt?
I could also populate dtClone from the original datasource if neccessary.
Thanks forthe help,
RAlph
Answer : Populate a DataTable from another DataTable
This "should" work!!
foreach (DataRow dr in dt.Rows)
{
CloneDT.ImportRow(dr);
}
But cloneDT is empty!!
I tried using a new empty DataTable but that got the same results no records returned.
Random Solutions
Disable Win XP auto-created printer from being auto-created by Citrix
calling stored procedure from function generates error
Stop comments from printing in Word 2007
Virtual Memory Errors
How do I import XML into Excel 2008 for Mac?
How do I Write a VB app to execute a stored procedure and a Crystal Report
Programmatically FIll Out a PDF Form
access sub-form with While...Wend to update main form
SQL Table-value function / permissions / Access Front End
How to convert this VB.NET code to VC# code?