ACCESS数据库的压缩,备份,还原,下载,删除的实现

时间:2020-04-08 14:28来源:快三在线投注平台数据库
复制代码 代码如下:html headmeta"Content-Language"content="zh-cn"meta"Content-Type"content="text/html;charset=gb2312"title数据库管理/title /head body divalign=center数据库管理种类/div br brpalign="center" % DimZC_DATABASE

复制代码 代码如下:html head meta"Content-Language"content="zh-cn" meta"Content-Type"content="text/html;charset=gb2312" title数据库管理/title /head body divalign=center数据库管理种类/div br br palign="center" % DimZC_DATABASE_PATH '数据库的门路ZC_DATABASE_PATH="database/data.mdb" data_array=Split(ZC_DATABASE_PATH,"/"卡塔尔国 Dimaction action=trim(request("action"卡塔尔卡塔尔国 Dimdbpath,bkfolder,bkdbname,fso,fso1 SelectCaseaction Case"" Callchushihua(State of Qatar Case"CompressData"'压缩数量 Dimtmprs dimallarticle dimMaxid dimtopic,username,dateandtime,body callCompressData(卡塔尔 case"BackupData"'备份数据 ifrequest("act"卡塔尔(قطر‎="Backup"Then callupdata(卡塔尔 else callBackupData(卡塔尔(قطر‎ endIf case"RestoreData"'复苏数据 dimbackpath ifrequest("act"State of Qatar="Restore"Then Dbpath=request.form("Dbpath"卡塔尔国 backpath=request.form("backpath"卡塔尔(قطر‎ifdbpath=""Then response.write"PleaseinputyourdatabasewholeName" else Dbpath=server.mappath(Dbpath卡塔尔(قطر‎ endIf backpath=server.mappath(backpath)SetFso=server.CreateObject("scripting.filesystemobject"卡塔尔国iffso.fileexists(dbpathState of QatarThen fso.copyfileDbpath,Backpath response.write"数据库被成功还原!br" else response.write"没找到你所供给的数据库!" endIf else callRestoreData(卡塔尔国endIf Case"SpaceSize"'系统空间攻下 callSpaceSize(卡塔尔国 Case"deletebackup" Dimdbname dbpath=Request.QueryString("dbpath"卡塔尔dbname=Request.QueryString("dbname"State of Qatar dbpath=Server.MapPath(dbpath卡塔尔(قطر‎dbpath=dbpath&""&dbname setfso=CreateObject("Scripting.FileSystemObject"卡塔尔国Iffso.FileExists(db帕特h卡塔尔国Then fso.DeleteFile(DBPath卡塔尔 Setfso=nothing response.write"br您备份的数据库已经"&dbpath&"被成功删除!brbrahref=""data_s.asp""重返../a" Else response.writedbpath response.write"br输入的不二秘诀错误,请确认后再次输入!brbrahref=""data_s.asp""返回../a" EndIf CaseElse EndSelect % /div % response.write"/body/html" Subchushihua() % divalign=center form br/ ahref="?action=CompressData"[削减数据库]/a br/br/ahref="?action=BackupData"[备份数据库]/a br/br/ahref="?action=RestoreData"[平复数据库]/a br/br/ahref="?action=SpaceSize"[系统空间吞噬]/a br/br/ /form /div %endsub% % '====================系统空间占有======================= SubSpaceSize(卡塔尔 OnErrorResumeNext % divalign=center divalign=center 系统空间查看 br/br/ form br 数据库:%showSpaceinfo("../"&data_array(1卡塔尔(قطر‎&""卡塔尔(قطر‎%brbr 备份数据库:%showSpaceinfo("databackup"卡塔尔%brbr 系统共计:%showSpaceinfo("/"卡塔尔% brbr /form /div br br br ahref="data_s.asp"返回.../a /div % EndSub % %SubShowSpaceInfo(drvpath) dimfso,d,size,showsize setfso=server.CreateObject("scripting.filesystemobject") drvpath=server.mappath(drvpath) setd=fso.getfolder(drvpath) size=d.size showsize=size&"Byte" ifsize1024Then size=(Size/1024) showsize=size&"KB" endIf ifsize1024Then size=(size/1024) showsize=formatnumber(size,2)&"MB" endIf ifsize1024Then size=(size/1024) showsize=formatnumber(size,2)&"GB" endIf response.write"fontface=verdana"&showsize&"/font" EndSub % % SubRestoreData() % divalign=center divalign=center br/...

编辑:快三在线投注平台数据库 本文来源:ACCESS数据库的压缩,备份,还原,下载,删除的实现

关键词: