I have a table "tblCards" with a field "Titre" that contain french
words (Hébert, Gagné, Hélène, etc....) in an database with
SQLEXPRESS 2005.
I have used the asp:SqlDataSource to filter the SELECT statement
according to a Textbox the user can type into. When used with the LIKE
condition using any acute caracters the SELECT statement return
nothing, unless the acute caracters is replaced with an ampersand "%".
Even the underscore "_" does not work! I have tried my logic with SQL
2000 and it's working just fine. Here the setup I have:
<asp:SqlDataSource SelectCommand="SELECT * FROM [tblCards] WHERE
([Titre] LIKE '%' + @Search + '%')>
<SelectParameters>
<asp:ControlParameter ControlID="txtSearch" Name="Search"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Now if I type a word like "Hébert" in the "txtSearch" Textbox nothing
is returned. But if I type "H%bert" it's working. Also typing "H_bert"
does not work!?!
Is this standard behavior or am I doing something wrong? Please help!
Alain