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
Change SQL server case sensitivity
Windows 7 users need help overcoming CRL for Security Certificate
cross database view or something in SQL Serve?
Use Loop to create sequential numbers
Getting rid of symbols
calculate every sunday in the year
Pass through query to Oracle
Where to start with Access Reports
Excel 2003 - How to delete rows - based on a criteria - as part of a macro
Oulook distribution list does not send to everyone in the list