当前位置: 首页 > 图文教程 > 网络编程 > ASP > ASP备份数据库

ASP
ASP编程中20个非常有用的例子
省名与城名下拉选择框联动
ASP有函数可以把某个网页通过STREAM下载吗?
用Regular Expression来改变HTML代码
控制输出字符串的长度,可以区别中英文
教你做小偷程序 容易学
小偷程序原理和简单示例
好漂亮的钟[代码]
实现WEB中的@虚拟域名系统 原理篇
ASP对excel的操作
将服务器端文件夹下的文件,按文件建立的时间先后排序
存储过程编写经验和优化措施
存储过程入门
在ASP中怎樣用Excel寫報表
在ASP中使用Oracle数据库技巧(1)
在ASP中使用Oracle数据库技巧(2)
在ASP中使用断开的记录集
披著羊皮的大野狼 Session
两级联动的select XML版
判断checkbox是否至少有选择一项

ASP备份数据库


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 25 ::
收藏到网摘: n/a

       文件1:BackupDB.asp
  
  <%@ Language=VBScript %>
  <HTML>
  <HEAD>
  <META name=VI60_defaultClientScript content=VBScript>
  <META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
  <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
  <!--
  
  Sub btnbak_onclick
  if frmbak.txtsvr.value="" then
  window.alert("'Server Name' is empty!")
  frmbak.txtsvr.focus
  exit sub
  end if
  if frmbak.txtuid.value="" then
  window.alert("'Administrators' is empty!")
  frmbak.txtuid.focus
  exit sub
  end if
  if frmbak.txtdb.value="" then
  window.alert("'Database' is empty!")
  frmbak.txtdb.focus
  exit sub
  end if
  if frmbak.txtto.value="" then
  window.alert("'Backup To' is empty!")
  frmbak.txtto.focus
  exit sub
  end if
  frmbak.submit
  End Sub
  
  -->
  </SCRIPT>
  <link rel="stylesheet" href="../../sheets/B2BStyle.css">
  </HEAD>
  <form action="backupdbsave.asp" method="post" id=frmbak name=frmbak>
  <body class="bg_frame_up">
  <p class=heading> Database --> Backup</p>
  <P align=center>
  <div align="center">
  <center>
  <table width="60%" cellpadding=1 cellspacing=1 border=0 align=center>
  <tr>
  <td class=TD_Mand_FN align="center" height="35" width="40%">Server Name:</td>
  <td class=TD_Mand_F height="35" width="59%">
  <INPUT id=txtsvr name=txtsvr size="20" style="font-family: Arial; font-size: 9pt"></td>
  </tr>
  <tr>
  <td class=TD_Mand_FN align="center" height="35" width="40%">Administrators:</td>
  <td class=TD_Mand_F height="35" width="59%">
  <INPUT id=txtuid name=txtuid size="20" style="font-family: Arial; font-size: 9pt"></td>
  </tr>
  <tr>
  <td class=TD_Mand_FN align="center" height="35" width="40%">Password:</td>
  <td class=TD_Mand_F height="35" width="59%">
  <INPUT id=txtpwd name=txtpwd type=password style="font-family: Arial; font-size: 9pt"></td>
  </tr>
  <tr>
  <td class=TD_Mand_FN align="center" height="35" width="40%">Database:</td>
  <td class=TD_Mand_F height="35" width="59%">
  <p align="left">
  <INPUT id=txtdb name=txtdb size="20" style="font-family: Arial; font-size: 9pt"></p>
  </td>
  </tr>
  
  <td class=TD_Mand_FN align="center" height="35" width="40%">Backup To:<br>
  <u>(Server Path)</u></td>
  <td class=TD_Mand_F height="35" width="59%">
  <input id=txtto name=txtto style="font-family: Arial; font-size: 9pt"></td>
  </tr>
  </table>
  </center> </div>
  <p align=center><input id=btnbak name=btnbak type=button value="Start Backup" style="font-family: Arial; font-size: 9pt"></p>
  </body>
  </form>
  </HTML>
  
  
  文件2:BackupDBSave.asp
  
  <%@ Language=VBScript %>
  <%
  dim msvr,muid,mpwd,mdb,mto
  msvr=Request.Form("txtsvr")
  muid=Request.Form("txtuid")
  mpwd=Request.Form("txtpwd")