Hi all :-)
I have a datatable that I need to clone completely except for 1 column - I
need to replace the contents of this 1 column with the contents from another
datatable that has the exact same number of rows. I've tried using Removeat
to remove the column, but when I try to add the column back in, it does not
work. All I want to do is overwrite the data that is there with the new
data. Any suggestions? Here is a snippet of the code that I have, but it
does not work!
Dim ldt_new_stat3c_city As New DataTable
Dim ldr_new_stat3c_city As DataRow
ldt_new_stat3c_city = idt_stat3c_city
ldt_new_stat3c_city.Columns.RemoveAt(6)
ldt_new_stat3c_city.Columns.Add(ldt_new_stat3c_cit y.Rows(li_indx).Item(7).To
String)
This just adds a column at the end and does not populate it! I've also
tried looping through the index and populating the column that way, which
does populate the column (I think - hard to tell for sure) but it removes
the column, and does NOT replace it with a new one, then I have the wrong
data in the next 2 columns and am completely missing the last column! Any
help would be MUCH appreciated, I have been working on this program for 3
days and really need to finish it by the end of today! TIA!
Coleen