用Delphi压缩Access数据库_Delphi
uses dao97,dao2000;
procedure CompactMdbDatabase(srcDbname,dstDbname,oldpwd,newpwd:string;baccess97:boolean=true);
var idbEngine:_dbEngine;
begin
if oldpwd <>'' then oldpwd := ';pwd='+oldpwd;
if newpwd <>'' then newpwd := ';pwd='+newpwd;
if bAccess97 then
begin
http://www.gaodaima.com/?p=66072用Delphi压缩Access数据库_Delphi
idbengine := CreateComObject(dao97.CLASS_DBEngine) as _DBEngine;
idbEngine.CompactDatabase(srcDbname,dstDbname,newpwd,dbVersion30,oldpwd);
end else
begin
idbengine := CreateComObject(dao2000.CLASS_DBEngine) as _DBEngine;
idbEngine.CompactDatabase(srcDbname,dstDbname,newpwd,dbVersion40,oldpwd);
end;
end;
欢迎大家阅读《用Delphi压缩Access数据库_Delphi》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码
原创文章,转载请注明: 转载自搞代码
本文链接地址: 用Delphi压缩Access数据库_Delphi

微信 赏一包辣条吧~

支付宝 赏一听可乐吧~
发表评论