سوال: قلا با این کد بک اپ میگرفتم الان خطا میده ؟

سلام وقت بخیر من در نسخه های قبلی نرم افزار توسط کد زیر بک آپ میگرفتم که الان خطا بهم میده؟ خطا را هم پیوست کردم میتونید ببینید. با تشکر

PerViewEntities db = new PerViewEntities(); db.Dispose(); SqlCommand oCommand = null; SqlConnection oConnection = null; try { string ConectionString = @"Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirector y|PerView.mdf;Integrated Security=True;User Instance=True"; string Command = @"backup database [" + Application.StartupPath + "\PerView.mdf] to disk ='" +strFileName + "' with init,stats=10"; this.Cursor = Cursors.WaitCursor; oConnection = new SqlConnection(ConectionString); if (oConnection.State != ConnectionState.Open) oConnection.Open(); oCommand = new SqlCommand(Command, oConnection); oCommand.ExecuteNonQuery(); this.Cursor = Cursors.Default; MessageBoxFarsi.Show("از اطلاعات بانک نسخه پشتیبانی تهیه شد."); } catch (Exception ex) { MessageBoxFarsi.Show("خطا :" + ex.Message); } finally { oConnection.Close(); //oCommand.Parameters.Clear(); oCommand.Dispose(); }

سوال: قلا با این کد بک اپ میگرفتم الان خطا میده ؟


خرید بک لینک
کپی رابت محفوظ است اخبار ایران و جهان
قدرت گرفته از niloblog