濮阳杆衣贸易有限公司

主頁 > 知識庫 > asp Access數(shù)據(jù)備份,還原,壓縮類代碼

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

熱門標簽:徐州人工智能電銷機器人好用嗎 騰訊地圖標注商戶關(guān)閉 智能電銷機器人適用于哪些行業(yè) 地圖標注宅基地 武漢營銷電話機器人軟件 西寧公司外呼系統(tǒng)平臺 外呼系統(tǒng)還用卡么 長沙防封電銷卡品牌 地圖標注服務(wù)哪家好
!--#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('失?。赫垯z查路徑和數(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
%>

標簽:通化 荊門 普洱 運城 通遼 鷹潭 巴彥淖爾 雅安

巨人網(wǎng)絡(luò)通訊聲明:本文標題《asp Access數(shù)據(jù)備份,還原,壓縮類代碼》,本文關(guān)鍵詞  asp,Access,數(shù)據(jù)備份,還原,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《asp Access數(shù)據(jù)備份,還原,壓縮類代碼》相關(guān)的同類信息!
  • 本頁收集關(guān)于asp Access數(shù)據(jù)備份,還原,壓縮類代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    常德市| 桦甸市| 昌乐县| 奉节县| 镇康县| 中超| 凯里市| 九江市| 鹤山市| 永吉县| 邢台市| 隆子县| 鸡泽县| 公安县| 三都| 黄浦区| 大新县| 吉木萨尔县| 乐亭县| 来安县| 天水市| 桐城市| 乃东县| 阳曲县| 安国市| 微山县| 绍兴市| 辽阳县| 黔东| 三原县| 洛隆县| 湛江市| 深州市| 日喀则市| 祁门县| 志丹县| 高唐县| 理塘县| 灵璧县| 博爱县| 波密县|