You can't modify a column type in DataTable
if already has records. You can Clone
DataTable and then modify column type in each column of cloned table. Later you can import rows.
DataTable dtClone = dt.Clone(); //just copy structure, no data
for (int i = 0; i < dtClone.Columns.Count; i++)
{
if (dtClone.Columns[i].DataType != typeof(string))
dtClone.Columns[i].DataType = typeof(string);
}
foreach (DataRow dr in dt.Rows)
{
dtClone.ImportRow(dr);
}
dtClone
will have every column as of string and all the data from original table dt