ASP.NET備份恢復(fù)SqlServer數(shù)據(jù)庫_.Net教程
推薦:asp.net編程中實(shí)現(xiàn) MD5 加密現(xiàn)在制作的web系統(tǒng)需要用到加密 依舊選擇md5吧(其實(shí)我也就用過md5^_^) 找到了兩種實(shí)現(xiàn) 方案一: /**//// /// 用md5加密 ///
備份SqlServer數(shù)據(jù)庫
核心技術(shù):
| using System.Data.SqlClient; using System.IO; string SqlStr1 = "Server=(local);DataBase=master;Uid=sa;Pwd="; string SqlStr2 = "Exec sp_helpdb"; string SqlStr1 = "Server=(local);database='" this.DropDownList1.SelectedValue "';Uid=sa;Pwd="; string SqlStr2 = "backup database " this.DropDownList1.SelectedValue " to disk='" this.TextBox1.Text.Trim() ".bak'"; |
1.前臺(tái)
|
<table> |
2.后臺(tái)
|
using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page |
還原SqlServer
核心技術(shù):
| string SqlStr1 = "Server=(local);database='" this.DropDownList1.SelectedValue "';Uid=sa;Pwd="; string SqlStr2 = "use master restore database " dbname " from disk='" path "'"; |
1.前臺(tái)
| <table> <tr> <td style="width: 100px; height: 21px"><span style="font-size: 9pt">操 作 數(shù) 據(jù) 庫</span></td> <td><asp:DropDownList ID="DropDownList1" runat="server" Font-Size="9pt" Width="124px"></asp:DropDownList></td> <td style="width: 100px; height: 21px"></td> </tr> <tr> <td style="width: 100px"><span style="font-size: 9pt">操 作 數(shù) 據(jù) 庫</span></td> <td style="width: 100px"><asp:FileUpload ID="FileUpload1" runat="server" Font-Size="9pt" Width="190px" /></td> <td style="width: 100px"> </td> </tr> <tr> <td colspan="3"><asp:Button ID="Button1" runat="server" Font-Size="9pt" OnClick="Button1_Click" Text="還原數(shù)據(jù)庫" /></td> </tr> </table> |
|
using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page protected void Button1_Click(object sender, EventArgs e) |
分享:ASP.NET常用的三十三種實(shí)用代碼1. 打開新的窗口并傳送參數(shù): 傳送參數(shù): response.write("<script>window.open(’*.aspx?id=" this.DropDownList1.SelectIndex &
- asp.net如何得到GRIDVIEW中某行某列值的方法
- .net SMTP發(fā)送Email實(shí)例(可帶附件)
- js實(shí)現(xiàn)廣告漂浮效果的小例子
- asp.net Repeater 數(shù)據(jù)綁定的具體實(shí)現(xiàn)
- Asp.Net 無刷新文件上傳并顯示進(jìn)度條的實(shí)現(xiàn)方法及思路
- Asp.net獲取客戶端IP常見代碼存在的偽造IP問題探討
- VS2010 水晶報(bào)表的使用方法
- ASP.NET中操作SQL數(shù)據(jù)庫(連接字符串的配置及獲取)
- asp.net頁面?zhèn)髦禍y(cè)試實(shí)例代碼
- DataGridView - DataGridViewCheckBoxCell的使用介紹
- asp.net中javascript的引用(直接引入和間接引入)
- 三層+存儲(chǔ)過程實(shí)現(xiàn)分頁示例代碼
.Net教程Rss訂閱編程教程搜索
.Net教程推薦
- 如何在VB.NET中利用Split和Replace函數(shù)計(jì)算字?jǐn)?shù)
- .Net應(yīng)用:制作ASP腳本組件實(shí)現(xiàn)重啟服務(wù)器
- 解析ASP.NET WebForm頁面內(nèi)容輸出方式
- 淺談ASP.NET兩個(gè)截取字符串的實(shí)用方法技巧
- asp.net2.0 URL重寫以及urlMappings問題(2)
- ASP.NET立即上手教程(7)
- 解讀 .NET開發(fā)者常犯的錯(cuò)誤
- 裝箱、轉(zhuǎn)型、方法調(diào)用他們究竟有什么區(qū)別?
- 淺析asp.net 里 include UTF8 垃圾問題
- 如何實(shí)現(xiàn)ASP.NET網(wǎng)站個(gè)性化
- 相關(guān)鏈接:
- 教程說明:
.Net教程-ASP.NET備份恢復(fù)SqlServer數(shù)據(jù)庫
。