最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

asp Access數(shù)據(jù)備份,還原,壓縮類代碼

 更新時間:2009年11月29日 22:34:28   作者:  
asp Access數(shù)據(jù)備份,還原,壓縮類實現(xiàn)代碼,大家可以參考下。
<!--#include file="config.asp" -->
<!--#include file="Fun.asp" -->
<%
'數(shù)據(jù)庫管理類
class Datas
'備份
public sub Bk()
Set fso=server.createobject("scripting.filesystemobject")
fso.CopyFile Server.MapPath(SiteDataPath),Server.MapPath(SiteDataBakPath)
     set fso=nothing
response.Write("<script language=javascript><!--
alert('備份成功!');window.location.href='DataManage.asp'
// --></script>")
end sub

'還原
    public sub Rt()
     SDPath = server.mappath(SiteDataPath)
SDBPath = server.mappath(SiteDataBakPath)
     set Fso=Server.CreateObject("Scripting.FileSystemObject")
if Fso.FileExists(SDBPath) then
Fso.CopyFile SDBPath,SDPath
Set Fso=nothing
         response.Write("<script language=javascript><!--
alert('成功:你已經(jīng)成功恢復(fù)數(shù)據(jù)庫!');window.location.href='DataManage.asp?action=rt'
// --></script>")
else
         response.Write("<script language=javascript><!--
alert('失敗:請檢查路徑和數(shù)據(jù)庫名是否存在');window.location.href='DataManage.asp?action=rt'
// --></script>")
end if
    end sub

    '壓縮
    public sub Dc()
     SDBPath = server.mappath(SiteDataBakPath)
     set Fso=Server.CreateObject("Scripting.FileSystemObject")
     if Fso.FileExists(SDBPath) then
Set Engine =Server.CreateObject("JRO.JetEngine")
     if request("boolIs") = "97" then
     Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath, _
         "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath & "_temp.mdb;" _
         & "Jet OLEDB:Engine Type=" & JET_3X
     else
     Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath, _
         "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath & "_temp.mdb"
end if
Fso.CopyFile SDBPath & "_temp.mdb",SDBPath
Fso.DeleteFile(SDBPath & "_temp.mdb")
set Fso = nothing
set Engine = nothing
     response.Write("<script language=javascript><!--
alert('成功:數(shù)據(jù)庫已經(jīng)壓縮成功!');window.location.href='DataManage.asp?action=dc'
// --></script>")
else
     response.Write("<script language=javascript><!--
alert('失?。簲?shù)據(jù)庫壓縮失敗,請檢查路徑和數(shù)據(jù)庫名是否存在!');window.location.href='DataManage.asp?action=dc'
// --></script>")
end if
    end sub     
end class
%>

相關(guān)文章

最新評論

微山县| 营山县| 大渡口区| 临夏县| 清原| 横山县| 蓝山县| 栾城县| 鹤岗市| 阳朔县| 伊宁县| 黑山县| 青浦区| 敖汉旗| 德江县| 靖州| 无极县| 浑源县| 东乌珠穆沁旗| 朔州市| 阿勒泰市| 大庆市| 新营市| 曲阳县| 墨江| 贵州省| 利津县| 潍坊市| 西青区| 吉木萨尔县| 白水县| 施甸县| 宁远县| 永年县| 家居| 富平县| 平阴县| 黎城县| 南乐县| 奉化市| 伊通|