Depending on the format of the text file, the way you pick the data off it may vary, but based on a csv file, you use pos to locate the ',' then copy the text to that point, and insert that value into the field in the table.
Generally, should be something like:
var
t: textfile;
l: string;
begin
AssignFile(T, 'd:\log.txt');
Reset(T);
while not eof(t) do
begin
readln(t,l);
table1.insert;
//process file entry - then table1.fieldbyname('whatever').AsString := processed value;
table1.post;
end;
closefile(T);
end;
Eg If text File is csv create a file with The same name as the text file you are working with but with .sch as the extension.
ACCLIST.TXT create ACCLIST.SCH
Create These Two File An You Will Se What I Mean
In The ACCLIST.SCH put The Folling
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.