Re: RowFilter where expression contains a single quote (such as O'Doul
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Feb 2009 15:33:40 -0600
"michael" <michael@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D17C82E3-A861-4AFC-99D6-DBAFF0CA0B2E@xxxxxxxxxxxxxxxx
I need to set a RowFilter where a value(string) is compared to the value in
a
column, such as "[LastName]=' " & strLast & " ' ".
Let's say the strLast has a value of O'Doul. When strLast is evaluated,
the
extra single quote causes the RowFilter string to fail. I know that
somehow
the single quote in O'Doul needs to be "escaped", but I can't quite figure
out the context. I tried replacing the single quote in strLast with a
backslash single quote( \' ), but that failed too.
How do I deal with an expression that contains this single quote?
--
Michael
I double all single quote characters. I replace ' with ''.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
.
- Follow-Ups:
- References:
- Prev by Date: RowFilter where expression contains a single quote (such as O'Doul
- Next by Date: Re: RowFilter where expression contains a single quote (such as O'
- Previous by thread: RowFilter where expression contains a single quote (such as O'Doul
- Next by thread: Re: RowFilter where expression contains a single quote (such as O'
- Index(es):
Relevant Pages
|