Clear datatable and get Null value


I would like to clear a DataTable, but the columns are not delete. I use the Clear datatable activitie.

Any ideas ?

Thank you





Have you specified DataTable variable to Clear dataTable or not ? Please check once.

After this Activity try to print this value:


If the above will print output as 0 then it cleared the data.

Hi @Emi_Zehcnas
you were almost done
Clear datatable activity will actually clear the records in the datatable except the columnname
–pass the datatable variable (lets take its name as outdt - a variable of type datatable) as input to this activity
–for more info on this

–as @lakshman said to check with the rows whether it got deleted or not
use a write line activity and mention like this
–check with the count value in the output panel and it would be 0 and if so you are good

hope this wuld help you
Kindly try this and let know for any queries or clarification
Cheers @Emi_Zehcnas

Thank for answers, I would like to delete datatable and columnname

I misspoke



If you want to delete whole data in DataTable variable ( data and headers ) then just create a new instance of it like: YourDT = New System.Data.DataTable - it will create new empty instance of DT


Nice, it works, thanks you !!! :slight_smile:

1 Like

:smiley: great ! Please tag as solved :wink:

done ! :slight_smile:

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