For each row : object reference not set an instance of an object

Hello there,
can anyone help, please? I am getting this error when running my both.

Whether “dtdata” contains any data in it? @Raffy_MC

1 Like

@Raffy_MC

Your dtdata does not have any data, that’s why you are seeing this error.

2 Likes

Hi @Raffy_MC,

Have you declared the dtdata varible (of type DataTable). Initialize dtdata variable wiith “Nothing” while declaring it.

Regards,
Rohith

1 Like

HI All,

Thank you for prompt response, it is declared just that I wasnt able to capture it.

@Raffy_MC You might need to change the Scope of that variable to the outermost scope and check, and make sure you don’t have two variables of the same name.

1 Like