M
Martyn Fewtrell
I'm sure this is straight forward but it has me stumped! (I assume this can
be done but cant find any online examples.)
I want to filter a single column in a DataView for more than one result but
cannot work out syntax that works using Vb.Net.
Let say I have a column (Names) with a range of names in it but want to
select only those called "John" and "Fred". The syntax
dvMyView.RowFilter = "Name = 'John'" will select those called John without
any issue.
I've tried all the obvious options like 'John' AND 'Fred' but cant seem to
work out the correct syntax.
Also if I want to Filter across several columns is this possible?
The only way I can make this work is to Filter the first Table using the
criteria on the first column and then use the results to create a second
table which I then Filter using the criteria on the second column. I would
then have to output the results from the second table. I am sure there must
be an easier way of doing this. (I am aware that I could easily just query
the database for the correct results in the first place but was trying to
avoid this!
You have my apologise if these are particularly dense questions!
be done but cant find any online examples.)
I want to filter a single column in a DataView for more than one result but
cannot work out syntax that works using Vb.Net.
Let say I have a column (Names) with a range of names in it but want to
select only those called "John" and "Fred". The syntax
dvMyView.RowFilter = "Name = 'John'" will select those called John without
any issue.
I've tried all the obvious options like 'John' AND 'Fred' but cant seem to
work out the correct syntax.
Also if I want to Filter across several columns is this possible?
The only way I can make this work is to Filter the first Table using the
criteria on the first column and then use the results to create a second
table which I then Filter using the criteria on the second column. I would
then have to output the results from the second table. I am sure there must
be an easier way of doing this. (I am aware that I could easily just query
the database for the correct results in the first place but was trying to
avoid this!
You have my apologise if these are particularly dense questions!