I am reading an xml file into a DataSet. I want to search the DataSet and display the results in a DataGrid via DataView. All of the fields in the DataSet are strings. I am having moderate success using DataView.RowFilter to find the data. However, in some cases there are some columns I search and find no results, and other cases where I find results but I must modify the search string. Here are a few examples and my comments (they may all be related to each other):
...
'the string appearing in the column is "64.29.82.169 "
'the string I want to find (a substring of column IP_Address) is ".169"
Dim dv As DataView
dv = New DataView
With dv
.Table = dsSelect.Tables("tblSelect")
.RowFilter = "IP_Address = '.169'"
End With
'I get no results here, but if I search for "64.29.82.169" or "64.29.82" or "64", or *any* substring as long as I begin the substring with the first character of the original, the RowFilter works fine.
...
'the string appearing in the column is "01/Jan/2004:10:52:24 "
'the string I want to find (a substring of column Date_Time) is "Jan"
Dim dv As DataView
dv = New DataView
With dv
.Table = dsSelect.Tables("tblSelect")
.RowFilter = "Date_Time = 'Jan'"
End With
'I get no results here, but if I search for "01/Jan/2004:10:52:24" or "01/Jan", or *any* substring as long as I begin the substring with the first character of the original, the RowFilter works fine.
...
'the string appearing in the column is "IE 5.5 Compatible Browser "
'the string I want to find (a substring of column User_Agent_String) is "IE 5.5"
Dim dv As DataView
dv = New DataView
With dv
.Table = dsSelect.Tables("tblSelect")
.RowFilter = "User_Agent_String = 'IE 5.5'"
End With
'I get no results here, no matter the value of the RowFilter.
I would appreciate any help resolving this. Thank you in advance.
Jody