Einzelnen Beitrag anzeigen

Robert_G
(Gast)

n/a Beiträge
 
#11

Re: SQL Like Groß-und Kleinschreibung

  Alt 26. Nov 2003, 14:19
Bist du sicher, dass du keine Quotes(') in deinem RichEdit hast?
Versuchs mal so:
Delphi-Quellcode:
Ds.SelectSQL.Text := 'SELECT *' + #13#10 +
                     'FROM xyz' + #13#10 +
                     'WHERE field1 LIKE ' QuotedStr(RichEdit1.Text);
// Oder

Ds.SelectSQL.Text := 'SELECT *' + #13#10 +
                     'FROM xyz' + #13#10 +
                     'WHERE field1 LIKE '+#39+'%'+StringReplace(RichEdit1.Text,#39,#39#39,[rfReplaceAll])+'%'+#39;
  Mit Zitat antworten Zitat