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
Code retriving duplicated numbers.
Group Policy Object applied but not running
Access Secruity.
How do I extract all the Windows XP and Internet Explorer passwords?
User logon Problems in 2008 Active Directory
Missing Winlogon from registry
Can I use a hard drive and a enclosure to backup a Win98 computer?
ISA Firewall - Open port 81 to Webserver on the Server
Importing/Linking Data from URL
ado.net reading first sheet of excel file.