"JemPower" <noemailspecified> wrote in message
news:Og*************@TK2MSFTNGP09.phx.gbl...
Hi all,
Can someone tell me if it's possible to search through a dataview based on
a part-filter.
For example, if I use...
Dim dvAvailable = New DataView(dsRecipients.Tables("Available"),
"name='%jo&'","", DataViewRowState.CurrentRows)
It would return
John
Jonathon
Yes, you can. I tried it and it works, but I don't see where or why you
would use the '&' character. I tried this: "title like '%Computer%'" and it
returned only book titles (from the titles table in the pubs sample) with
that word in them. It also hit on 'Computers' as expected.
This is from MSDN for VS.Net 2003
__________________________________________________ _________
WILDCARD CHARACTERS
Both the * and % can be used interchangeably for wildcards in a LIKE
comparison. If the string in a LIKE clause contains a * or %, those
characters should be escaped in brackets ([]). If a bracket is in the
clause, the bracket characters should be escaped in brackets (for example
[[] or []]). A wildcard is allowed at the beginning and end of a pattern, or
at the end of a pattern, or at the beginning of a pattern. For example:
"ItemName LIKE '*product*'"
"ItemName LIKE '*product'"
"ItemName LIKE 'product*'"
Wildcards are not allowed in the middle of a string. For example, 'te*xt' is
not allowed.
__________________________________________________ __
These expression are a subset of SQL expressions.
--
Jim (for e-mail replace invalid with com)
"Remember, an amateur built the Ark; professionals built the Titanic."