Hi Guys!

I realize this is a question I could answer myself with some testing but wanted your opinions.

I am looking to see if a certain row exists in a dataset (2000+rows). I have two methods.

1) Brute Force
VB Code:
  1. For iRow = 0 To objTblMaillist.Rows.Count - 1 Step 1
  2.    If Not (objTblMaillist.Rows(iRow).Item(0) Is GetType(System.DBNull)) Then
  3.       If CStr(objTblMaillist.Rows(iRow).Item(0)) = sShortCode Then
  4.          bFound = True
  5.          Exit For
  6.       End If
  7.    End If
  8. Next iRow

vs

2) Framework

VB Code:
  1. objTblMaillist.PrimaryKey = New System.Data.DataColumn() {objTblMaillist.Columns(0)}
  2. objTblMaillist.DefaultView.Sort = "Source"
  3.  
  4. If objTblMaillist.DefaultView.Find(sShortCode) >= 0 Then
  5.    bFound = True
  6. End If

So what do think would be quicker?

Thanks,
Matt