我想把查询到的文本文档显示在Memo中
但是到最后只能显示最后查到的那一条
为什么呢?
拜托大家告诉我为什么好么
  if  ADOQuery1.Active = false then
      ADOQuery1.Active := true ;
  if  ADOQuery1.Active  then
    begin    ADOQuery1.First ;
    while not ADOQuery1.Eof do
       begin
       memo1.Text := ADOQuery1.Fields[0].AsString;
       ADOQuery1.Next;
       end ;
    end ;这是我写的一段代码
帮我看看那里出错了啊

解决方案 »

  1.   

    if  ADOQuery1.Active = false then
          ADOQuery1.Active := true ;
      if  ADOQuery1.Active  then
        begin    ADOQuery1.First ;
        while not ADOQuery1.Eof do
           begin
           memo1.Text := memo1.Text  +  ADOQuery1.Fields[0].AsString;
           ==========================================================       ADOQuery1.Next;
           end ;
        end ;
      

  2.   

    Str : String ;
    Str := '';
    memo1.Text := Str +  ADOQuery1.Fields[0].AsString + #13; //加个回车就可以执行分行了
      

  3.   

    with ADOQuery1 do
      begin
        if  IsEmpty then
          Exit;
        First ;
        while not Eof do
           begin
             Memo1.Text := Memo1.Text + Fields[0].AsString + #13 ;  //回车换行
             Next;
           end ;
      end;