JackQu的程序员博客

欢迎来的我Blog.这里记录工作学习的点滴,愿与大家分享。欢迎大家共同交流 。

导航

取一个文本的第二、三行


  var aGoodsDesc:TStringList;
      j:Integer;
      aGoods:String;
  
begin
    
with cdsDss do begin
      Close;
      Open;
      First;
      aGoodsDesc:
=TStringList.Create;
      
while not Eof do begin
      aGoods:
='';
      aGoodsDesc.text:
=trimright(FieldbyName('GoodsDesc').asString);
      
for j:=1 to 2 do begin
        aGoods:
=iif(aGoods<>'',aGoods+#13#10+aGoodsDesc.Strings[j],aGoodsDesc.Strings[j]);
      
end;

        Edit;
        FieldbyName(
'GoodsDesc').asString:=aGoods;
        Post;
        Next;
      
end;
    
end;
  
end

posted on 2008-12-19 16:14  Qcj  阅读(281)  评论(0编辑  收藏  举报