以下为引用的内容: void restoreButton_Click(object sender, System.EventArgs e) { string path = pathTextBox.Text; string dbname = dbDropDownList.SelectedValue; string restoreSql = "use master;"; http://www.gaodaima.com/?p=37183怎样做sql server数据库的还原_sqlserver string pai = "use master;ALTER DATABASE Wy SET OFFLINE WITH ROLLBACK IMMEDIATE;ALTER DATABASE Wy SET ONLINE WITH ROLLBACK IMMEDIATE"; SqlCommand myCommand = new SqlCommand(restoreSql, new SqlConnection(ConnStr)); myCommand.Parameters.Add("@dbname", SqlDbType.Char); try } } |
欢迎大家阅读《怎样做sql server数据库的还原_sqlserver》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码