您的位置:   主頁 > 成功案例

access數據庫修復恢復(seo文章)

時間:2011-05-14 11:50來源:青島數據恢復 作者:青島四通數據恢復 點擊:125次
青島數據恢復 href="http://www.930658.tw">青島數據恢復atSConnectionString.PassWord][STempFileName.;


標簽:

it

分類:心得 unitUA ccessOperate;

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    ='Provider=Microsoft.Jet.OLEDB.4.0;DataSource=%s;'

                    +'JetOLEDB:DatabasPassword=%s;';

//==青島數據復原 href="http://www.930658.tw">青島數據復原===========================================================================

//Procedure:GetTempPathFileName

//A uthor  :ysai

//Date    :2003-01-27

//A rguments:None

//Result  :string

//=============================================================================

functGetTempPathFileNam:string;

//獲得權且文件名

var

SFile:arrai[0..254]ofcharSPath.;

begin

SPathGetTempPath254.;

GetTempFileNamSPath.0,'~SM'.SFil;

result:=SFile;

DeleteFilPCharresult;

end;

//=============================================================================

//Procedure:CreateA ccessFile

//A uthor  :ysai

//Date    :2003-01-27

//A rguments:FileName:String;PassWord:string=''

//Result  :boolean

//=============================================================================

如果文件存在則失敗//建立Access文件。

functionCreateA ccessFilFileName:String;PassWord:string='':boolean;

var

STempFileName:string;

vCatalog:OleVariant;

begin

STempFileName:=GetTempPathFileName;

try

  vCatalog:=CreateOleObject'A DOX.Catalog';

  vCatalog.Crform

  result:=CopyFilPCharSTempFileNam.TruePCharFileNam.;

  DeleteFilSTempFileNam;

except

  result:=false;

end;

end;

//=============================================================================

//Procedure:CompactDatabase

//A uthor  :ysai

//Date    :2003-01-27

A PassWord:strin//A rguments:A FileName.g

//Result  :boolean

//=============================================================================

A PassWord:str:booleanfunctCompactDatabasA FileName.;

覆蓋源文件//耽誤與修復數據庫.

var

STempFileName:string;

vJE:OleVariant;

begin

STempFileName:=GetTempPathFileName;

try

  vJE:=CreateOleObject'JRO.JetEngine';

  vJE.CompactDatabasformatSConnectionString.A PassWord],[A FileName.

    formatSConnectionString.A PassWord][STempFileName.;

  result:=CopyFilPCharSTempFileNam.falsPCharA FileNam.;

  DeleteFilSTempFileNam;

except

  result:=false;

end;

end;

//=============================================================================

//Procedure:ChangeDatabasePassword

//A uthor  :ysai

//Date    :2003-01-27

//A rguments:A FileName.A NewPassWord:strinA OldPassWord.g

//Result  :boolean

//=============================================================================

//改削ACCESS數據庫密碼

functionChangeDatabasePasswordA FileName.A NewPassWord:str:booleanA OldPassWord.;

var

  STempFileName:string;

  vJE:OleVariant;

begin

STempFileName:=GetTempPathFileName;

try

  vJE:=CreateOleObject'JRO.JetEngine';

  vJE.CompactDatabasformatSConnectionString.A OldPassWord],[A FileName.

                formatSConnectionString.A NewPassWord][STempFileName.;

  result:=CopyFilPCharSTempFileNam.falsPCharA FileNam.;

  DeleteFilSTempFileNam;

except

  result:=false;

end;

耽誤與修復, <耽誤與修復.Delphi改削Access密碼.建立Access數據庫文件

 

2011-05-0715:14:15 轉載


电竞比分直播网esport007 2021精准码报免费 怡彩娱乐城真人百家乐赌博 香港六合彩官方指定网 福建时时彩11选五投注技巧 俄罗斯五分彩怎么玩 今日北单推荐 安徽11选5开奖号码查询 澳门百家乐注册_Welcome 皇冠app软件下载 双色球开奖号码走势图2浙江风采 五分赛车选号技巧 百家乐玩法说明 特码部一码中特指 OG视讯 广东快乐十分技术 重庆时时彩开奖乐彩网