|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP在国内异常流行,因为国内大多使用的是盗版的Windows和盗版的SQLServer,而ASP+COM+SQLServer实际上也是一种不错的搭配,其性能也不输于PHP+MYSQL,特别是Windows系统和SQLServer都有图形界面,比APACHE和MYSQL易于维护,因此对于不重视知识产权的国家来说也是一种不错的选择。恢复|数据|数据库文件4:RestoreDB.asp
<%@Language=VBScript%>
<HTML>
<HEAD>
<METAname=VI60_defaultClientScriptcontent=VBScript>
<METANAME="GENERATOR"Content="MicrosoftFrontPage4.0">
<SCRIPTID=clientEventHandlersVBSLANGUAGE=vbscript>
<!--
Subbtnbak_onclick
iffrmbak.txtsvr.value=""then
window.alert("ServerNameisempty!")
frmbak.txtsvr.focus
exitsub
endif
iffrmbak.txtuid.value=""then
window.alert("Administratorsisempty!")
frmbak.txtuid.focus
exitsub
endif
iffrmbak.txtdb.value=""then
window.alert("Databaseisempty!")
frmbak.txtdb.focus
exitsub
endif
iffrmbak.txtto.value=""then
window.alert("RestoreFromisempty!")
frmbak.txtto.focus
exitsub
endif
frmbak.submit
EndSub
-->
</SCRIPT>
</HEAD>
<formaction="restoredbsave.asp"method="post"id=frmbakname=frmbak>
<bodyclass="bg_frame_up">
<linkrel="stylesheet"href="../../sheets/B2BStyle.CSS">
<pclass=heading>Database-->Restore</p>
<Palign=center>
<divalign="center">
<center>
<tablewidth="60%"height="71"cellpadding=1cellspacing=1border=0align=center>
<tr>
<tdclass=TD_Mand_FNalign="center"height="35"width="40%">ServerName:</td>
<tdclass=TD_Mand_Fheight="35">
<INPUTid=txtsvrname=txtsvrsize="20"style="font-family:Arial;font-size:9pt"></td>
</tr>
<tr>
<tdclass=TD_Mand_FNalign="center"height="35"width="40%">Administrators:</td>
<tdclass=TD_Mand_Fheight="35">
<INPUTid=txtuidname=txtuidstyle="font-family:Arial;font-size:9pt"></td>
</tr>
<tr>
<tdclass=TD_Mand_FNalign="center"height="35"width="40%">Password:</td>
<tdclass=TD_Mand_Fheight="35">
<INPUTid=txtpwdname=txtpwdtype=passwordstyle="font-family:Arial;font-size:9pt"></td>
</tr>
<tr>
<tdclass=TD_Mand_FNalign="center"height="35"width="40%">Database:</td>
<tdclass=TD_Mand_Fheight="35">
<INPUTid=txtdbname=txtdbstyle="font-family:Arial;font-size:9pt"></td>
</tr>
<tr>
<tdclass=TD_Mand_FNalign="center"height="35"width="40%">Restore
From:<br>
<u>(ServerPath)</u></td>
<tdclass=TD_Mand_Fheight="35">
<inputid=txttoname=txttostyle="font-family:Arial;font-size:9pt"></td>
</tr>
</table></center>
</div>
<palign=center><inputid=btnbakname=btnbaktype=buttonvalue="StartRestore"style="font-family:Arial;font-size:9pt"></p>
</body>
</form>
</HTML>
文件5:RestoreDBSave.asp
<%@Language=VBScript%>
<%
dimmsvr,muid,mpwd,mdb,mto
msvr=Request.Form("txtsvr")
muid=Request.Form("txtuid")
mpwd=Request.Form("txtpwd")
mdb=Request.Form("txtdb")
mto=Request.Form("txtto")
ifmpwd=""thenmpwd=""
onerrorresumenext
setdmosvr=server.CreateObject("SQLDMO.SQLServer")
dmosvr.connectmsvr,muid,mpwd
iferr.number>0thenResponse.Redirect("http:backuperr.asp?err="&err.number)
mdevname="Restore_"&muid&"_"&mdb
dmosvr.backupdevices(mdevname).remove
err.clear
setdmodev=server.CreateObject("SQLDMO.BackupDevice")
dmodev.name=mdevname
dmodev.type=2
dmodev.PhysicalLocat</p>减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。 |
|