All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET,2.0,WebService中传递DataTable参考_[Asp.Net教程]
delphi存储过程的使用实例
如何用C#写所见即所得的设计器_[Asp.Net教程]
ASP.NET技巧:Web导出Word需要添加头文件_[Asp.Net教程]
ASP.NET下使用MD5加密_[Asp.Net教程]
asp.net回车键执行相应按钮事件的代码_[Asp.Net教程]
ASP.NET,2.0的Web,Part,Framework_.net资料_编程技术
C#学习,无废话C#设计模式之一:开篇_.net资料_编程技术
浅谈.NET中的数据绑定表达式_[Asp.Net教程]
ASP.NET将Web站点下的绝对路径转换为虚拟路径_[Asp.Net教程]
Reading number is top 10 pictures
Sexy women in 2013--2
Perfect small Laurie2
教你做读书笔记
Abdominal hit by iron--HangZhou best driver parking save passengers
Chinese paper-cut grilles art appreciation8
这才是真正的人体艺术5
如果没有好报,为什么要做好人?
Sora aoi on twitter5
From China fortress sora aoi2
YangYuYing and ZhengShaoQiu dance on the generous come interest dye-in-the-wood
Download software ranking
Boxer Classic video3
Tram sex maniac 2 (H) rar bag9
Sora aoi, the nurse, uniform ,nursing assistant
Visual C++界面编程技术
在线棋牌游戏3.05版
Macromedia Dreamweaver 8
Boxer vs Yellow4
美女写真3
Eclipse 4.2.1 For Win32
仙剑奇侠传98版歌曲
delv published in(发表于) 2014/1/27 6:48:29 Edit(编辑)
ASP.NET备份恢复SqlServer数据库_[Asp.Net教程]

ASP.NET备份恢复SqlServer数据库_[Asp.Net教程]

ASP.NET备份恢复SqlServer数据库_[Asp.Net教程]























备份SqlServer数据库:
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'";
SqlConnection con = new SqlConnection(SqlStr1);
con.Open();
try
{
if (File.Exists(this.TextBox1.Text.Trim()))
{
Response.Write("");
return;
}
SqlCommand com = new SqlCommand(SqlStr2, con);
com.ExecuteNonQuery();
Response.Write("");
}
catch (Exception error)
{
Response.Write(error.Message);
Response.Write("");
}
finally
{
con.Close();
}
还原SqlServer数据库:
string path = this.FileUpload1.PostedFile.FileName; //获得备份路径及数据库名称
string dbname = this.DropDownList1.SelectedValue;
string SqlStr1 = "Server=(local);database='" + this.DropDownList1.SelectedValue + "';Uid=sa;Pwd=";
string SqlStr2 = "use master restore database " + dbname + " from disk='" + path + "'";
SqlConnection con = new SqlConnection(SqlStr1);
con.Open();
try
{
SqlCommand com = new SqlCommand(SqlStr2, con);
com.ExecuteNonQuery();
Response.Write("");
}
catch (Exception error)
{
Response.Write(error.Message);
Response.Write("");
}
finally
{
con.Close();
}













































添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.