<HTML>
<HEAD>
<TITLE>數據庫操作_網頁設計家園</TITLE>
<meta http
</HEAD>
<BODY>
<form method="post" name=myform>
<%if action="restore" then%><INPUT TYPE="hidden" name="action" value="restore">准備恢復數據庫
<%elseif action="backup" then%><INPUT TYPE="hidden" name="action" value="backup">准備備份數據庫
選擇操作
<INPUT TYPE="radio" name="action" id="act_backup" value="backup"><label for=act_backup>備份</label>
<INPUT TYPE="radio" name="action" id="act_restore" value="restore"><label for=act_restore>恢復</label><%end if%>
<br>數據庫名
<br>文件路徑
<input type="submit" value="確定">
</form>
<%
’SQL Server 數據庫的備份與恢復!
’
dim sqlserver
sqlserver = "localhost" ’sql服務器
sqlname = "sa" ’用戶名
sqlpassword = "sa" ’密碼
sqlLoginTimeout =
databasename = trim(request("databasename"))
bak_file = trim(request("bak_file"))
bak_file = Server
act = lcase(request("action"))
if databasename = "" then
response
else
if act = "backup" then
Set srv = Server
srv
srv
Set bak = Server
bak
bak
bak
bak
bak
’bak
bak
if err
response
response
end if
Response
srv
Set srv = nothing
Set bak = nothing
elseif act = "restore" then
’恢復時要在沒有使用數據庫時進行!
Set srv=Server
srv
srv
Set rest = Server
rest
rest
rest
rest
rest
if err
response
response
end if
rest
Response
srv
Set srv = nothing
Set rest = nothing
else
Response
end if
end if
%>
</BODY>
</HTML>
From:http://tw.wingwit.com/Article/program/net/201311/14316.html