|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
楼上说交互性不好,太牵强了吧。在微软提供的一套框架中,利用asp做网站,开发效率高,使用人数少,减少不必要的开销。交互性是互动方式,是有开发人员决定的。恢复|数据|数据库
文件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.PhysicalLocation=mto
dmosvr.BackupDevices.Adddmodev
iferr.number>0thenResponse.Redirect("http:backuperr.asp?err="&err.number)
setdmores=server.CreateObject("SQLDMO.Restore")
dmores.database=mdb
dmores.devices=mdevname
%>
<HTML>
<HEAD>
<METANAME="GENERATOR"Content="MicrosoftVisualStudio6.0">
</HEAD>
<bodyclass="bg_frame_up">
<p><strong>Restoring,waitplease...</strong></p>
<%
dmores.sqlrestoredmosvr
iferr.number>0thenResponse.Redirect("http:backuperr.asp?err="&err.number)
setdmores=nothing
setdmodev=nothing
dmosvr.disconnect
setdmosvr=nothing
%>
<p><strong>Database<%=mdb%>restoresuccessed!</strong></p>
</BODY>
</HTML>
在实现ERP等高端的ASP应用时,用户需要提供核心的经营资料,需要ASP商有很高的信用度。楼上说交互性不好,太牵强了吧。在微软提供的一套框架中,利用asp做网站,开发效率高,使用人数少,减少不必要的开销。交互性是互动方式,是有开发人员决定的。 |
|