Re: How can i escape special characters( % [ _ ) in an Access SQL stat
- From: "forest demon" <mete.hanap@xxxxxxxxx>
- Date: 27 Nov 2006 21:00:17 -0800
dude! that's what i was looking for.
i can stack them like so if need be:
'%" + tbProduct.Text.Replace("'", "''").Replace("%", "[%]")
..Replace("[", "[[]") + "%'
that works fine for me now...
thanks man....i appreciate your input!
Joe Mayo (C# MVP) wrote:
Hi,
Would doing a myString.Replace("X", "[X]") will work.
Joe
--
http://www.csharp-station.com
"forest demon" wrote:
i need to escape characters, such as ( % and/or _ and/or [ ),
since i have database entries that have such characters in them.
the following piece works fine in an SQL statement (c#), but doesn't
return entries that have one of the above characters in the argument.
... like '%" + tbProduct.Text.Replace("'", "''") + "%' ...
thanks folks...
-¿-
.
- References:
- How can i escape special characters( % [ _ ) in an Access SQL statement?
- From: forest demon
- How can i escape special characters( % [ _ ) in an Access SQL statement?
- Prev by Date: Re: timer not being called when OnPaint calls Invalidate
- Next by Date: Re: String concatenation issue
- Previous by thread: How can i escape special characters( % [ _ ) in an Access SQL statement?
- Next by thread: Re: How can i escape special characters( % [ _ ) in an Access SQL statement?
- Index(es):
Relevant Pages
|