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
Registry cannot load the hive.
convert delimited text file into 2 dimension array
CREATE AN MSDOS BOOT CD FOR ACRONIS, KNOPPIX, GHOST, WINDOWS XP REPAIR CONSOLE!
trouble with displaying recordset results in datasheet view
offline SharePoint Workspace with Office Web Apps
Same form on different computers
Outlook 2007 Continuous Authencication
XP display set to 4 bit color depth after Remote Desktop session
Error when assigning value to textbox in footer during runtime
Code works fine in debug mode, but not at run time