Gauls
Gauls

Reputation: 1965

implicit conversion from object to boolean

I keep getting this exception "implicit conversion from object to boolean" for below expression how do i get rid of it?

 Dim objRows As IEnumerable(Of DataRow) = (From myRow As DataRow In objDS.Tables(0).AsEnumerable Where myRow.Item(PERSON_ID_LIST) = personid).Cast(of DataRow)

Upvotes: 1

Views: 727

Answers (1)

Tim Schmelter
Tim Schmelter

Reputation: 460288

Try

 Dim objRows As IEnumerable(Of DataRow) = 
    From myRow As DataRow In objDS.Tables(0).AsEnumerable()
    Where myRow.Field(Of Int32)("PERSON_ID_LIST") = personid 

otherwise you have to tell us what PERSON_ID_LIST is.

Upvotes: 2

Related Questions