这是我用Ado做的,你参考一下
var
path:string;
begin
path:=ExtractFilePath(Application.ExeName);
if path[length(path)]<>'\' then
path:=path+'\';
adoconnection1.Connected:=false;
try
adoconnection1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' +path + 'Data.MDB' + ';Persist Security Info=False';
adoconnection1.Connected:=true;
adoquery1.Active:=true;
adoquery2.Active:=true;
except
MessageBox(GetActiveWindow(), 'ϵͳ´íÎó!', '¾¯¸æ', MB_OK + MB_ICONWARNING);
application.Terminate;
end;
end;