Late Binding when using For Each on a DataTable

Hey guys.

I’m trying to do the exercise from training level 1 where you have to ForEach a DataRow. However, I cannot do it, because i am getting a “Option Strict on disallows late binding”

image

Can you help me out? :slight_smile:

In your assign statement at end use copytodatatable method and make filtereddata variable type as datatable and use for each row and print in message like row(“Name”).tostring

or In your scenario from the assign statement you are getting array of Datarows(Datarow) and in for each your argument type should be (System.Data.Datarow) and in Message Box use row(“Name”).tostring

1 Like

I changed the variable type to DataRow and it worked. Thanks @anil5 :slight_smile:

Hi I am facing similar issue… can some one help

image

image

Buddy change the type argument property as datarow in for each loop buddy @sprath

1 Like

As suggested by @anil5 set for each argument type should be (System.Data.Datarow) { after clicking on for each you will see the property .in their you have to set argument type }

Thanks @Palaniyappan…it worked :slight_smile:

1 Like

great…
cheers buddy @sprath