B
BBM011
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.BitBtn1Click(Sender: TObject);
var
i:integer;
s1:tstringlist;
data_froms:string;
card_nos:string;
attend_dates,create_dates:string;
begin
s1:=tstringlist.Create ;
try
s1.LoadFromFile('RecvAll.txt');
progressbar1.Max:=s1.Count;
progressbar1.Position:=0;
for i:=0 to s1.Count-1do
begin
with ADOQuery1do
begin
data_froms:='007';
card_nos:=copy(s1,17,6);
attend_dates:=copy(s1,24,10)+' '+copy(s1,35,8);
close;
sql.Clear;
sql.Add('insert into sys_timecard values ('''+card_nos+''','''+attend_dates+''','''+data_froms+''',''1'',getdate())');
Edit1.Text:=sql.CommaText;
execsql;
end;
end;
except
//
end;
end;
var
i:integer;
s1:tstringlist;
data_froms:string;
card_nos:string;
attend_dates,create_dates:string;
begin
s1:=tstringlist.Create ;
try
s1.LoadFromFile('RecvAll.txt');
progressbar1.Max:=s1.Count;
progressbar1.Position:=0;
for i:=0 to s1.Count-1do
begin
with ADOQuery1do
begin
data_froms:='007';
card_nos:=copy(s1,17,6);
attend_dates:=copy(s1,24,10)+' '+copy(s1,35,8);
close;
sql.Clear;
sql.Add('insert into sys_timecard values ('''+card_nos+''','''+attend_dates+''','''+data_froms+''',''1'',getdate())');
Edit1.Text:=sql.CommaText;
execsql;
end;
end;
except
//
end;
end;