Changing datatype of a column in a datatable

  • Thread starter Thread starter Griff
  • Start date Start date
G

Griff

When attempting to change the datatype for a datatable column with the
following code:

dtap.Columns(4).DataType = system.Type.GetType"System.String")

I keep getting an error that says that I can't change the datatype
because there is data in the table. However, I know there is no data in
the table, as I have cleared the table and tested the results.

Please help.

Thanks
 
Griff,

Why not just add a column and remove a column than in this case?

I would not search to long in your situation.

Cor
 
Back
Top