How to convert data table row values into array?

yes! after writing into excel with that DT its working , but before sql dt directly is not workinG!!

Hi @MitheshBolla .

Firstly, Could you Check with the below Expression if the same error happens or a Validation Error is present :

DT.AsEnumerable().Select(r => r["ID"].ToString()).ToArray()

If the above doesn’t work, Could you maybe perform a Debug and Check the Column Datatypes of Datatable that was retrieved from SQL query ?

Checking the Datatype can be done in the below Way :
image

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