Working on a Requirement where I am using Run query Activity getting error

I am fetching details thru run query activity also getting the output but when i am iterating into for each loop getting error system data table cannot be converted into IEnumerable.

Can anybody give the solution here so that i can able iterating records one by one.

Thanks in Advance !!

Hi,

How about to use ForEachRow activity?
OR Use dt.AsEnumerable() as the following?

Regards,

Thanks for replying ,

Yes i am using in for each loop when i am giving my datatable table variable then its giving exception like below mentioned-

Also how I can convert normal data table variable into Enumerable in which my output is stored thru sql query.

Hi,

dt.AsEnumerable() returns IEnumerable<DataRow>. Can you try as the above image?

Regards,

Thanks @Yoichi Its working as expected !!

Cheers !!

Happy Automation !!

1 Like

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