我的问题是:
  字段1  字段2 字段3  字段4 字段5  字段6
  往往   饿饿
  事实   方法
就是说 字段1 字段2 不管后面是否为空, 字段1 字段2 都不为空
我想把字段3  字段4 字段5  字段6 后面为空的记录都不显示 怎么办

解决方案 »

  1.   

    sql.text:=select * from yourtable where 字段3 is not null and  字段4 is not null
    and  字段5 is not null and 字段6 is not null
      

  2.   

    即在数据集的after open 事件中实现
      

  3.   

    CDS.First;
      while not CDS.Eof do begin
        b := False;                                       
    CDS.RecordCount-1 do  begin
        for j := 0 to CDS.FieldCount - 1   do begin
          if CDS.Fields.Fields[j].Tag < 0 then  continue;
          if not CDS.Fields.Fields[j].IsNull then begin
               b := True;
                break;
               end;
          end;
      CDS.Next;
     end;
    我写的 不对 不能实现