How To fix "The source contains no DataRows."?

I filter nothing data in datatable, my expect is i get rows.count “0”, but i get this error “The source contains no DataRows.” how to fix it ?

Hi @Iwan_Kurniawan2

Have a look on the thread

Regards
Gokul

1 Like

Hey!

There might be a chance of having the white spaces. Try to use the trim.

Whenever we’re using string variable will suggest you to use the Trim.

Try this and let me know…

Regards,
NaNi

Try with below expression

This expression will return an bool value.

Dt.AsEnumerable().Where(Function(x) x(1).Tostring="20").Any

Regards
Gokul

Thanks, btw can you tell me what different .Select and .Where ?

oke thanks bro

thanks… very helpful :slight_smile:

Regards
Gokul

[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum

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