How to use variables in datatable.select


#1

Hello,

I have two csv files (csvA and csvB). and trying to retrieve the row from csvA which column1 contains value listed in csvB.
I’m sturgling with datatable.select. I want to use variables in select comparison but it couldn’t understand variables.
Just wondering how to fix the syntacs?
question

Thank you.
KN


#2

You can use in this way:

dtalluser.Select("[Column1] = ‘" +Convert.ToString(targetempid) +"’")


#3

Thanks Palindrome, it works perfectly for me! Thank you very much!


#4

Welcome :slight_smile: