procedure TForm1.ADOConnection1BeforeConnect(Sender: TObject);
begin
with ADOConnection1do
begin
try
close;
ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+GetCurrentDir+'/demo.mdb;Persist Security Info=False';
except
end;
end;
end;