سلام دوستان.من کدهای زیر رو وارد می کنم و اکسپشن رو هم می زارم .لطفا ایرادهامو بگید.ممنون
string command = @"BACKUP DATABASE [accounting] TO DISK = N'" + strFileName + "' WITH NOFORMAT, NOINIT, NAME = N'accounting-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10";
this.Cursor = Cursors.WaitCursor;
SqlCommand oCommand = null;
SqlConnection oConnection = null;
string scnn = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\accounting.mdf;trusted_connection=yes;";
oConnection = new SqlConnection(scnn);
if (oConnection.State != ConnectionState.Open)
oConnection.Open();
oCommand = new SqlCommand(command, oConnection);
oCommand.ExecuteNonQuery();
this.Cursor = Cursors.Default;
oConnection.Close();
اینم اکسپشن