If it is boolean, simply try this.
dsans.Tables(0).Select("correct_ans")
Your comparison is for string types, not for boolean.
[Edit]
I really missed this part when I found problem at first.
For j = 0 To dtans.Rows.Count - 1
If dtans.Rows(j).Equals(foundRows) Then
iRowIndex = j
Exit For
End If
Next
foundRows
is array of
DataRow
. What you are trying to is to equate
DataRow
to it.