ASP数据库恢复的代码
2018-09-06 12:49
文件4:RestoreDB.asp
<%@ 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(Restore From is empty!)
frmbak.txtto.focus
exit sub
end if
frmbak.submit
End Sub
-->
Restore
文件5:RestoreDBSave.asp
<%@ Language=VBScript %>
<%
dim msvr,muid,mpwd,mdb,mto
msvr=Request.Form(txtsvr)
muid=Request.Form(txtuid)
mpwd=Request.Form(txtpwd)
mdb=Request.Form(txtdb)
mto=Request.Form(txtto)
if mpwd= then mpwd=
on error resume next
set dmosvr=server.CreateObject(SQLDMO.SQLServer)
0 then Response.Redirect(http:backuperr.asp?err=err.number)
上一篇:编写网页木马详解