现有一个表,其中有TEXT字段,如果根据该字段中包含的内容来查找记录,DELPHI怎么实现?

解决方案 »

  1.   

    就直接用一般的查找不行吗?
    类似于nvchar
      

  2.   

    select fieldname from tablename where fieldname =  'text field value'
      

  3.   

    select fieldname from tablename where fieldname like  'text field value'
      

  4.   

    select fieldname from tablename where fieldname like  '%text field value%'
      

  5.   

    使用
      selectstr:='select * from tablename where substring(fieldname,1,2) like "te"';
      Query1.SQL.Clear;
      Query1.SQL.Add(selectstr);
      Query1.Open; 错误信息:project project1.exe raised exception class edbengineerror with message 'invalid use of keyword. token:,1,2)line number:1'.process stopped.use step or run to continue.