怎样在delphi 界面中实现数据从文本文件(*.txt)导入到oracle数据库表中!(200分)

  • 主题发起人 hucy_2000
  • 开始时间
H

hucy_2000

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样在delphi 界面中实现数据从文本文件(*.txt)导入到oracle数据库表中!
同时用delphi界面实现导入进度条!
 
procedure TForm1.Button1Click(Sender: TObject);
var TextList:Tstringlist;
LineStr:string;
LineNo:integer;
begin
Textlist:=Tstringlist.create;
if opendialog1.Execute then
begin
Textlist.LoadFromFile(opendialog1.filename);
LineNo:=0;
while LineNo<TextList.Count do
begin
LineStr:=Textlist[LineNo];
Table1.InsertRecord(Copy(LineStr,1,4),Copy(LineStr,5,10),Copy(LineStr,16,10));
Inc(LineNo);
end;
end;
TextList.Free;
end;
 
也可以用Tstringlist来load
 
顶部