Board index » delphi » Searching text in a formatted memo field

Searching text in a formatted memo field

Hello!
  I have wrote  this simple sql statement: Select * from Atabel Where
ATextFormatted LIKE "%something%".
but no record has been founded...  The field I refer is a formatted memo. I
execute the same statement on a memo field everything is ok. Is there
possibile searchin on formatted Memo?

Thanks
marco

 

Re:Searching text in a formatted memo field


Maybe it will help you.
Use RichText component to handle formatted memos. It has a method FindText
which will search formatted memo text. Throw away the WHERE clause from the
query, run it and do a
  while not Query1.Eof do
    if FindText(... see Help) then
  DoSomething...

or if Atable is a local one, work directly with it.

Dragos

Other Threads