access数据库修复恢复(seo文章)
it
interface
usWindows.ComObj,Sysutils.Dialogs,A ctiveX;
//改削ACCESS数据库密码
functionChangeDatabasePasswordA FileName.A NewPassWord:str:booleanA OldPassWord.;
覆盖源文件//耽误与修复数据库.
A PassWord:str:booleanfunctionCompactDatabasA FileName.;
如果文件存在则失败//建立Access文件。
functionCreateA ccessFilFileName:String;PassWord:string='':boolean;
implementation
//声名连接字符串
Const
SConnectionString
//==青岛数据复原 href="http://www.raidst.com">青岛数据复原===========================================================================
//Procedure:GetTempPathFileName
//A uthor
//Date
//A rguments:None
//Result
//=============================================================================
functGetTempPathFileNam:string;
//获得权且文件名
var
SFile:arrai[0..254]ofcharSPath.;
begin
SPathGetTempPath254.;
GetTempFileNamSPath.0,'~SM'.SFil;
result:=SFile;
DeleteFilPCharresult;
end;
//=============================================================================
//Procedure:CreateA ccessFile
//A uthor
//Date
//A rguments:FileName:String;PassWord:string=''
//Result
//=============================================================================
如果文件存在则失败//建立Access文件。
functionCreateA ccessFilFileName:String;PassWord:string='':boolean;
var
STempFileName:string;
vCatalog:OleVariant;
begin
STempFileName:=GetTempPathFileName;
try
except
end;
end;
//=============================================================================
//Procedure:CompactDatabase
//A uthor
//Date
A PassWord:strin//A rguments:A FileName.g
//Result
//=============================================================================
A PassWord:str:booleanfunctCompactDatabasA FileName.;
覆盖源文件//耽误与修复数据库.
var
STempFileName:string;
vJE:OleVariant;
begin
STempFileName:=GetTempPathFileName;
try
except
end;
end;
//=============================================================================
//Procedure:ChangeDatabasePassword
//A uthor
//Date
//A rguments:A FileName.A NewPassWord:strinA OldPassWord.g
//Result
//=============================================================================
//改削ACCESS数据库密码
functionChangeDatabasePasswordA FileName.A NewPassWord:str:booleanA OldPassWord.;
var
begin
STempFileName:=GetTempPathFileName;
try
except
end;
耽误与修复, |