procedure Tfrm_zhsksj.BitBtn2Click(Sender: TObject);
var
i:integer;
s1:tstringlist;
begin
s1:=tstringlist.Create ;
try
s1.LoadFromFile(edit1.text);
progressbar1.Max:=s1.Count;
progressbar1.Position:=0;
for i:=0 to s1.Count-1 do
begin
with dmconnectiondb.adoqskjl do
begin
close;
sql.Clear;
sql.Add('insert into k_skjl');
sql.Add('values');
sql.Add('kh,:kzbh,:skdate,:sktime,:remark)');
parameters.ParamByName('kh').Value:=copy(s1,4,4);
parameters.ParamByName('kzbh').Value:=copy(s1,14,1);
parameters.ParamByName('skdate').Value:=copy(s1,14,4)+'-'+copy(s1,18,2)+'-'+copy(s1,20,2);
parameters.ParamByName('sktime').Value:=copy(s1,22,2)+':'+copy(s1,24,2);
parameters.ParamByName('remark').Value:=copy(s1,26,2);
execsql;
progressbar1.Position:=progressbar1.Position+1;
end;
end;
messagebox(handle,'卡鐘數据已經成功轉換為TABLE表','計算机提醒您﹗',mb_iconinformation+mb_ok);
except
begin
messagebox(handle,'請指定卡鐘數据文件的位置﹗','計算机提醒您﹗',mb_iconinformation+mb_ok);
end;
end;