L
liu420
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button6Click(Sender: TObject);
var
filepath,filename:string;
path2,name2:string;
begin
filepath:=trim(edit1.Text);
filename:=trim(edit2.Text);
//全文件名
path2:= ExtractFilePath(filename);
// 路径
name2:=ExtractFileName(filename);
//文件名
ADOConnection1.ConnectionString :=
'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' +
filepath + ';Persist Security Info=False';
ADOConnection1.Connected := true;
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Text:='insert into aaa select * from [Text;FMT=Delimited;HDR=Yes;DATABASE='+path2(路径)+';].['+name2(文件名)+']';
adoquery1.ExecSQL;
上面提示出错信息为 ".....验证失败",哪们高手帮忙看看,是不是这方法不对....
var
filepath,filename:string;
path2,name2:string;
begin
filepath:=trim(edit1.Text);
filename:=trim(edit2.Text);
//全文件名
path2:= ExtractFilePath(filename);
// 路径
name2:=ExtractFileName(filename);
//文件名
ADOConnection1.ConnectionString :=
'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' +
filepath + ';Persist Security Info=False';
ADOConnection1.Connected := true;
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Text:='insert into aaa select * from [Text;FMT=Delimited;HDR=Yes;DATABASE='+path2(路径)+';].['+name2(文件名)+']';
adoquery1.ExecSQL;
上面提示出错信息为 ".....验证失败",哪们高手帮忙看看,是不是这方法不对....