How to Change the DataType of DataColumn

I tried Using below in Assign:
DT_LookUp.Columns(“ProductID”).DataType=TypeOf(System.Int32)

But its throwing error

@loginerror

Hi,

Can you try the following expression?

DT_LookUp.Columns(“ProductID”).DataType=System.Type.GetType("System.Int32")

Note: There must be no data in the column/datatable.

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.