Tuesday, April 03, 2007

Search in dataset

dtState.PrimaryKey = New DataColumn() {dtState.Columns("State")}

Dim drStateCode As DataRow
Dim sCode as String
drStateCode = dtState.Rows.Find("Nebraska")
sCode = drStateCode("code").toString
'sCode is now "NE"

No comments: