Hi all,

if someone could help me , I would be gratefull.

Problem is next.
I have .txt file with 270.000 rows, to import into database, but file is not segmented for example:
Row 1 Name1, Address, City
Row 2 - Row 50 are received sum of money, according to Numbers of conto Nr, for Name1, coma separated,
Row 51 name2, Address, City,
Rows 52-99 again are received sum of money, according to Numbers of conto Nr, for Name2, coma separated,

Therefore, I should import all sums of money received every name, thera are 48.

and so until 270000 rows.

In this Code I specify Splitting of file .txt to segments.

Code:


procedure TForm1.Button1Click(Sender: TObject);
var Lista:TStringList;
i,j:integer;
begin
Lista:=TStringList.Create;
Lista.LoadFromFile('c:\datas.txt');
j:=1;
Memo1.Lines.Clear;
Memo2.Lines.Clear;


Memo3.Lines.Clear;
for i:=0 to Lista.Count-1 do
begin
if Lista[i]='name1' then
j:=2;
if Lista[i]='name2' then
j:=3;
if (Lista[i]<>'name1' ) and (Lista[i]<>'name2' ) and (Lista[i]<>.......) then
TMemo(FindComponent('Memo'+IntToStr(j))).Lines.App end(Lista[i]);
end;
Lista.Free
end;




I need to import all data for every name into access table - database, specify by name, and sum.
I think it should be min two table.
One with data for names and the second for data of Conto Number and sums.

Tnx beforehand