【www.gdgbn.com--Access】

  asp数据库备份程序,这程序是我初学asp时用fso写的一个在线文件备份代码,简单也比较实用了,只是只对access数据库,备份原理就是把文件复制到我们指点的地方了,好了下面看源码.

<%
  dim action,start,index1
  start=request.Form("start")
  index1=request.Form("index")
  action=request.QueryString("action")
 
    if action=1 then 
 call admin()
  call startdata(start,index1)
  end if 
  sub startdata(start_d,index_d)
  call f_s_o()
  on error resume next
  set copy_file=fi.getfile(server.MapPath(index1))
    copy_file.copy server.MapPath(start)
  if err=0 then
  response.Write("<script language="javascript">alert("数据库备份成功!");history.back();</script>")
  else
  response.Write("<script language="javascript">alert("数据库备份失败!");history.back();</script>")
  end if
    end sub
  %>

本文来源:http://www.gdgbn.com/shujuku/16196/