Use DAO CompactDatabase, plus a password when the ACCESS database should be how to write?

Category: Delphi -> Database Author: ascarid Date: 2001-07-10 08:13:16
 
ascarid
2001-07-10 08:13:16
When removing the password correctly, there will be an error with the password: prompt password is incorrect.
Thank you!
fengww629
2001-07-10 08:25:43
procedure TF_main.N_COMPRESSClick (Sender: TObject);
var ole_tmp: olevariant;
src_file, des_file, app_path: string;
begin
engine: = codbengine.create;

dtmd1.Database1.Connected: = false;
app_path: = copy (application.exename, 1, length (application.exename) -16);
; if copy (app_path, length (app_path), 1) = '\' then
app_path: = copy (app_path, 1 ,
length (app_path) -1);

src_file: = app_path + '\ data \ ENGINER.mdb';
des_file: = app_path + '\ data \! ~ tmp.mdb';
engine.CompactDatabase (src_file, des_file, ole_tmp, ole_tmp, '; pwd = * & ^ rfv ');

deletefile (src_file);
renamefile (des_file, src_file) ;

messagedlg ('data compression is completed!', mtinformation, [mbok], 0);
; dtmd1.Database1.Connected: = true;
dtmd1.Tbl_system.Open;
; / / engine._Release;

end;
hs35622
2001-07-10 08:27:55
IUPRG (love, power outages, travel and study hard in ):
ole_tmp is what to do with?