procedure TForm1.BitBtn1Click(Sender: TObject);
var str:string;
begin
if opendialog1.Execute then
edit1.text:=opendialog1.FileName;
str:='DBQ='+edit1.text+';Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;UID=admin;UserCommitSync=Yes;';
adoconnection1.Close;
try
adoconnection1.ConnectionString :=str;
adoconnection1.GetTableNames(combobox1.Items,false)
except
messagedlg('数据连接失败!',mterror,[mbok],0);
end;
end;