You are not logged in.
Pages: 1
i try search record with like
not work
Rec := TSQLDataRec.Create(Database, 'Fam like "%"', [Search.Text]);
work
Rec := TSQLDataRec.Create(Database, 'Fam like "%"', [Search.Text + '%']);
Rec := TSQLDataRec.Create(Database, 'Fam like "%' + Search.Text + '%"');
Offline
About LIKE operator in SQLite3:
http://www.sqlite.org/lang_expr.html
This is IMHO the perfectly standard use of LIKE in SQL - see http://sqlzoo.net/howto/source/u.cgi/tip977255
And you should better use a prepared statement and use single quotes, as specified by SQLite3.
Read the mORMot documentation about prepared statements.
Offline
thank for reply i found solution:
Rec := TSQLDataRec.Create(Database, 'Fam like "%%%"', [Search.Text]);
its work fine!
Offline
Pages: 1