try { gn.open(); string str; str = @"RESTORE DATABASE bw FROM DISK = 'C:\SQLBackup\bw.bak'"; SqlCommand cmd = new SqlCommand(str, gn.cn()); cmd.ExecuteNonQuery(); }
restore cannot process database 'bw' because it is in use by this session. it is recommended that the master database be used when performing this operation. restore database is terminating abnormally
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)