2,497
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.Button1Click(Sender: TObject);
var
pathstr:string;
str:widestring;
begin
if opendialog1.Execute then
begin
pathstr:=opendialog1.FileName ;
str:='Provider=Microsoft.Jet.OLEDB.4.0;'
+'Data Source='+pathstr
+';Persist Security Info=False';
//Str:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+pathstr+';Persist Security Info=False';
adoconn.Connected:=false ;
//adoconnection1.ConnectionString :='';
adoconn.ConnectionString :=str;
adoconn.Connected:=true;
end;
end;
//这样试下我这能过了
//用你的在我这也出错了
procedure TForm1.Button1Click(Sender: TObject);
var
pathstr:string;
str:widestring;
begin
if opendialog1.Execute then
begin
pathstr:=opendialog1.FileName ;
str:='Provider=Microsoft.Jet.OLEDB.4.0;'
+'Data Source='+pathstr
+';Persist Security Info=False';
//Str:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+pathstr+';Persist Security Info=False';
adoconn.Connected:=false ;
//adoconnection1.ConnectionString :='';
adoconn.ConnectionString :=str;
adoconn.Connected:=true;
end;
end;
//这样试下我这能过了
//用你的在我这也出错了