1、Ado压缩
procedure TForm1.Button2Click(Sender: TObject);
var
Dest_DB_Connection: OleVariant;
l_Source_Con_Str, l_Dest_Con_Str: string;
begin
try
Dest_DB_Connection := CreateOleObject('JRO.JetEngine');
except
Exit;
end;
l_Source_Con_Str := 'Data Source=C:/1.mdb;';
l_Dest_Con_Str := 'Data Source=C:/2.mdb;';
try
OleCheck(Dest_DB_Connection.CompactDatabase(l_Source_Con_Str, l_Dest_Con_Str));
except
end;
end;