0
While searching:
AQuery.Filter := 'nome LIKE ''%jose%''';
The result José da Silva is not shown due to the accent in the letter is.
I researched several related issues and realized that:
- The Mysql call works normal when using my database manager.
SELECT * FROM pessoas
WHERE nome LIKE '%jose%'
This command returns to me as expected José da Silva.
- Making the call with
SELECT
in Delphi works.
AQuery.Open('SELECT * FROM pessoas WHERE nome LIKE ''%jose%''');
This command returns to me as expected José da Silva.
- Making the call with
Filter
in Delhi NAY works
Filter := 'nome LIKE ''%jose%''';
This command NAY return me the José da Silva.
Problem
I just don’t get what I want when I use the Filter
, then there is some problem in this method.
Solutions
I tried several solutions, among them the command.
Filter := 'Upper(nome_pessoa) like '+QuotedStr('%'+ AnsiUpperCase(Texto)+'%');
But I was unsuccessful.
What class of
AQuery
?– Junior Moreira
The class is
TFDQuery
– Soon Santos