with qryPDMX do {TADOQUERY}
    begin
      Close;
      SQL.Clear;
      SQL.Add( Format('SELECT * FROM RQ_PDMX where PDDH = ''%s''',[cxDBTextEdit1.Text]));
      open;
    end;无法显示数据 ,何解?

解决方案 »

  1.   

    看看你表格是否连接了datasource,datasource是否连接了dataset,再有你这个sql的查询结果有没有数据呀
      

  2.   

       with qryPDMX do {TADOQUERY}
        begin
          Close;
          SQL.Clear;
          SQL.Add( Format('SELECT * FROM RQ_PDMX where PDDH = ''%s''',[cxDBTextEdit1.Text]));
          open;
        end;
      showmessage(inttostr(qryPDMX.RecordCount));
    加一句showmessage看看是否qryPDMX已经提取了数据,如果是,就要检查其他的如DBgrid连接DataSource,Datasource连接qryPDMX