我用while not DS.Eof  do循环取值,怎么能返回所有值??
谢谢

解决方案 »

  1.   

    看帮助,DELPHI自带的例子:
    Usually DisableControls is called within the context of a try...finally block that reenables the controls even if an exception occurs. For example:with CustTable do
    begin
      DisableControls;
      try
        First;
        while not Eof do
        begin
         { Process each record here }
         Next;
        end;
      finally
        EnableControls;
      end;
    end;
      

  2.   

    先first
    然后while do
    取值,next
    end;
      

  3.   

    ds.first
    while no ds.eof do 
    begin
      取值;
      方法为:ds.fieldbyname('字段名').asstring;
      ………………
      ds.next;
    end;