I have problem with filtering database with LIKE statement. In query i'm doing 
this:
...
WHERE [EMAIL PROTECTED] AND (ze_nazwa LIKE @ze_nazwa ESCAPE '\' OR ze_typ_el 
LIKE @ze_nazwa ESCAPE '\')
and in program for @ze_nazwa i'm inserting this string:
string elementFiltr = "%" + (new 
Regex(@"([\\%_])")).Replace(this.elementTextBox.Text, @"\$1") + "%";
Regex.Replace is working just beautiful! but SELECT returns me like there was 
no LIKE!
i was thinking that maybe '\' is parsed wrong because it is common escape 
character and could be somewhere parsed twice for example, but..
another character for escape character is not working too:) e.g.:
...
WHERE [EMAIL PROTECTED] AND (ze_nazwa LIKE @ze_nazwa ESCAPE '!' OR ze_typ_el 
LIKE @ze_nazwa ESCAPE '!')
and in program:
string elementFiltr = "%" + (new 
Regex(@"([!%_])")).Replace(this.elementTextBox.Text, @"!$1") + "%";
In two examples above Regex.Replace is working good. Can someone point me where 
i am wrong or how to use '@' and '_' characters in LIKE syntax?

sorry i didn't mention that i am using system.data.sqlite 
wrapper and C#

Thanx for help!


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to