一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

PHP教程|ASP.NET教程|Java教程|ASP教程|編程技術(shù)|正則表達式|C/C++|IOS|C#|Swift|Android|VB|R語言|JavaScript|易語言|vb.net|

服務(wù)器之家 - 編程語言 - ASP教程 - asp Access數(shù)據(jù)備份,還原,壓縮類代碼

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

2019-09-07 15:13腳本之家 ASP教程

asp Access數(shù)據(jù)備份,還原,壓縮類實現(xiàn)代碼,大家可以參考下。

  1. <!--#include file="config.asp" -->  
  2. <!--#include file="Fun.asp" -->  
  3. <%  
  4. '數(shù)據(jù)庫管理類  
  5. class Datas  
  6. '備份  
  7. public sub Bk()  
  8. Set fso=server.createobject("scripting.filesystemobject")  
  9. fso.CopyFile Server.MapPath(SiteDataPath),Server.MapPath(SiteDataBakPath)  
  10.      set fso=nothing  
  11. response.Write("<script language=javascript><!--  
  12. alert('備份成功!');window.location.href='DataManage.asp'  
  13. // --></script>")  
  14. end sub  
  15.  
  16. '還原  
  17.     public sub Rt()  
  18.      SDPath = server.mappath(SiteDataPath)  
  19. SDBPath = server.mappath(SiteDataBakPath)  
  20.      set Fso=Server.CreateObject("Scripting.FileSystemObject")  
  21. if Fso.FileExists(SDBPath) then  
  22. Fso.CopyFile SDBPath,SDPath  
  23. Set Fso=nothing  
  24.          response.Write("<script language=javascript><!--  
  25. alert('成功:你已經(jīng)成功恢復(fù)數(shù)據(jù)庫!');window.location.href='DataManage.asp?action=rt'  
  26. // --></script>")  
  27. else  
  28.          response.Write("<script language=javascript><!--  
  29. alert('失?。赫垯z查路徑和數(shù)據(jù)庫名是否存在');window.location.href='DataManage.asp?action=rt'  
  30. // --></script>")  
  31. end if  
  32.     end sub  
  33.  
  34.     '壓縮  
  35.     public sub Dc()  
  36.      SDBPath = server.mappath(SiteDataBakPath)  
  37.      set Fso=Server.CreateObject("Scripting.FileSystemObject")  
  38.      if Fso.FileExists(SDBPath) then  
  39. Set Engine =Server.CreateObject("JRO.JetEngine")  
  40.      if request("boolIs") = "97" then  
  41.      Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath, _  
  42.          "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath & "_temp.mdb;" _  
  43.          & "Jet OLEDB:Engine Type=" & JET_3X  
  44.      else  
  45.      Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath, _  
  46.          "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SDBPath & "_temp.mdb"  
  47. end if  
  48. Fso.CopyFile SDBPath & "_temp.mdb",SDBPath  
  49. Fso.DeleteFile(SDBPath & "_temp.mdb")  
  50. set Fso = nothing  
  51. set Engine = nothing  
  52.      response.Write("<script language=javascript><!--  
  53. alert('成功:數(shù)據(jù)庫已經(jīng)壓縮成功!');window.location.href='DataManage.asp?action=dc'  
  54. // --></script>")  
  55. else  
  56.      response.Write("<script language=javascript><!--  
  57. alert('失?。簲?shù)據(jù)庫壓縮失敗,請檢查路徑和數(shù)據(jù)庫名是否存在!');window.location.href='DataManage.asp?action=dc'  
  58. // --></script>")  
  59. end if  
  60.     end sub       
  61. end class  
  62. %> 

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 3d动漫被吸乳羞羞 | 农村妇女野战bbxxx | 特黄特黄aaaa级毛片免费看 | 四虎影免看黄 | 99这里只有精品66视频 | 白丝校花掀起短裙呻吟小说 | www.一区 | 国产欧美综合精品一区二区 | 四虎影视色费永久在线观看 | 国内精品久久久久影院嫩草 | 久九九精品免费视频 | 干b视频在线观看 | 高中生放荡日记高h娜娜 | 亚洲精品动漫免费二区 | 亚洲精品第五页中文字幕 | 黑人日白人 | 513热点网深夜影院影院诶 | 国产精品午夜国产小视频 | 999热在线精品观看全部 | 无人区在线观看免费视频国语 | 日韩欧美中文字幕出 | 免费国产一级 | 日本久久免费大片 | 欧美涩区 | 精品一区二区三区高清免费观看 | 亚洲人成在线观看一区二区 | 色中文字幕 | 新影音先锋男人色资源网 | 按摩师他揉我奶好爽捏我奶 | asianfemdom冷柔女王 | 美女脱了内裤打开腿让人桶网站o | 国产成人免费在线观看 | 久久永久视频 | 亚洲天堂精品视频 | 99热在线这里只有精品 | 日本精品久久久久久久久免费 | 亚洲国产精品自产在线播放 | 暖暖日本在线观看免费 | 免费看欧美一级特黄a大片一 | 亚洲美洲国产日产 | 亚洲精品国产成人 |