... while not dm.ADOTable.Eof do begin FS:=TFileStream.Create( 'File'+ IntToStr(i) + '.doc', fmCreate);