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
how can i loop through the tables in my database and do a record count for each table?
Second login required when starting Outlook?
Import a result set from DB2 to Access using TransferDatabase
Creating Add/Edit forms for levels of BOM assemblies in Access
How to make all the controls readonly at runtime in c# windows form
UserForm Initialization
Can someone suggest the easiest way to print 1099-R Forms in MS Word
How to import data into excel sheet from remote unix box.
New motherboard will not boot
How can I retrieve the HTML source from a web page at a certain URL?