Query.close;
  Query.SQL.Clear;
  Query.SQL.Add('select * from DICOMreport.db');
  Query.SQL.Add(Format('where StudyUID="%s"',[si.strStudyUID]));
  Query.Open;

解决方案 »

  1.   

    Query.close;                             // repare the cache 
      Query.SQL.Clear;                         // clear the command
      Query.SQL.Add('select * from DICOMreport.db');  
      Query.SQL.Add(Format('where StudyUID="%s"',[si.strStudyUID]));
                                              // add the sql command  
                                              // select * fom tablename  where  Query.Open;                             // excute the sql sentence and
                                              // restore results to the cache
    hahahhah.
      

  2.   

    sql执行关闭
    清空语句
    添加语句(查找在此表中的所有纪录)
    添加语句(如果该字段的值是以s结尾,格式化输出)
    执行sql语句
      

  3.   

    SethDelphi(所有程序只写半天) 
    跟没说一样
    执行之后在si的该字段显示在dbgrid里
      

  4.   

    用query执行一段sql语句,并把结果返回给query
    sql语句是:select * from DICOMreport.db where StudyUID‘si.strStudyUID’
    其中si.strStudyUID是delphi的一个变量。