G
Guest
Hi There
I am having trouble with the DataRowView.RowFilter
I am giving subscribers to an asp.NET application the ability to search
through a large group of historical records based on a "Subject" field.
They have a textbox (txtSubjectCriteria) within which they enter search
criteria and then I have a radio button list that allows them to select
whether their entered criteria should be any part of a word or phrase, or a
whole word or phrase.
The any part of a word or phrase is easy and the filter string would be:
Filter = "Subject Like '%" & txtSubjectCriteria.Text & "%'"
I am, however, struggling with the whole word only option. The operators on
the DataRowView.RowFilter seem to be a bit limited ? I was expecting to be
able to use:
Filter = "Contains (Subject, '" & txtSubjectCriteria.Text & "')"
or something similar - but this does not seem to be a valid statement ?
Does anybody know how I can achieve this - I really need it to be done at
this level rather than with the original SQL statement.
Thanks for your help
Stuart
I am having trouble with the DataRowView.RowFilter
I am giving subscribers to an asp.NET application the ability to search
through a large group of historical records based on a "Subject" field.
They have a textbox (txtSubjectCriteria) within which they enter search
criteria and then I have a radio button list that allows them to select
whether their entered criteria should be any part of a word or phrase, or a
whole word or phrase.
The any part of a word or phrase is easy and the filter string would be:
Filter = "Subject Like '%" & txtSubjectCriteria.Text & "%'"
I am, however, struggling with the whole word only option. The operators on
the DataRowView.RowFilter seem to be a bit limited ? I was expecting to be
able to use:
Filter = "Contains (Subject, '" & txtSubjectCriteria.Text & "')"
or something similar - but this does not seem to be a valid statement ?
Does anybody know how I can achieve this - I really need it to be done at
this level rather than with the original SQL statement.
Thanks for your help
Stuart