当前位置: 移动技术网 > IT编程>开发语言>.net > ASP数据库恢复的代码

ASP数据库恢复的代码

2018年10月15日  | 移动技术网IT编程  | 我要评论

叶静肚皮舞入门教学视频,xoxo组合,黄宗隆

文件4:restoredb.

<%@ 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("restore from is empty!")
frmbak.txtto.focus
exit sub
end if
frmbak.submit
end sub

-->
</script>
</head>
<form action="restoredbsave.asp" method="post" id=frmbak name=frmbak>
<body class="bg_frame_up">
<link rel="stylesheet" href="../../sheets/b2bstyle.css">

<p class=heading> database --> restore</p>

<p align=center>
<p align="center">
<center>
<table width="60%" height="71" 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">
<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">
<input id=txtuid name=txtuid 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">
<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">
<input id=txtdb name=txtdb style="font-family: arial; font-size: 9pt"></td>
</tr>
<tr>
<td class=td_mand_fn align="center" height="35" width="40%">restore
from:<br>
<u>(server path)</u></td>
<td class=td_mand_f height="35">
<input id=txtto name=txtto style="font-family: arial; font-size: 9pt"></td>
</tr>
</table></center>
</p>
<p align=center><input id=btnbak name=btnbak type=button value="start restore" style="font-family: arial; font-size: 9pt"></p>
</body>
</form>
</html>

文件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")
dmosvr.connect msvr,muid,mpwd

if err.number>0 then response.redirect("http:backuperr.asp?err="&err.number)

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网