excel 자료를 파라독스 DB로 변환하려고 합니다.
그런데 맨 처음 데이타를 불러오지 못하네요.
어찌하면 좋겠습니까?
procedure TFjajae.Button1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
with ADOQuery1 do
begin
close;
ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' +
OpenDialog1.Filename + ';Extended Properties=Excel 8.0;Persist Security Info=False';
SQL.Clear;
SQL.Add('SELECT * FROM [Sheet1$]');
open;
end;
with ADOQuery1 do
begin
First;
while not Eof do
begin
Table1.Append;
Table1.FieldByName('No').Asstring := Fields[0].Asstring;
Table1.FieldByName('Code_no').Asstring := Fields[1].Asstring;
Table1.FieldByName('Item').Asstring := Fields[2].Asstring;
Table1.FieldByName('Size').Asstring := Fields[3].Asstring;
Table1.FieldByName('Su').Asstring := Fields[4].Asstring;
Table1.Post;
next;
end;
end;
end;