Dt.rows.count throws object reference not to set to instance

Hi ,
I have a variable of type list

and initiated as New list(of system.Data.Datatable)
.i will add different dt to this list and loop through each one of them later.It was working fine.Recently i did remove some namespace using “Delete unused”.After this i m getting error where i do looping of the tables.I checked both the dt has data and added to the collections .While looping ,the first step is to check if its empty like dt.rows.count ,i get titled error at this location. Don’t know what is missing

Hi,

This error means dt is null (Nothing). Can you share your workflow, if possible?

Regards,

I fixed it by doing dt initiation using New System.Data.DataTable. The dt initiate was done for the dt mentioned in for each activity. Previously it got auto initiated i guess and was working fine without this step. Not sure what has caused it suddenly.

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