Search code examples
vb.netdataviewrowfilter.net-4.5.2

RowFilter for DataView


I am having problems with a DataView.RowFilter not returning the proper row that it should return. I currently keep Col2 has my variable name in the database and Col3 is the value associated with the variable name. When I try pulling the dataview with the filter below it doesn't add a row. When I remove the filter all my records are there. Anyone know why or can explain to me what is wrong with my filter or can a dataview not return only one row?

.RowFilter = String.Format("[Col2] LIKE '%{0}%' AND [Col3] = '{1}'", Name, Value)

An example of a search would be Col2 I am searching for First Name and Col3 would be I am searching for the Name Joe.


Solution

  • It turns out it wasn't the filter, when I was stepping through other parts of the code it broke when checking for permissions if the user had the right to edit the database.