0

http://www.daniweb.com/software-development/csharp/threads/202843/take-backup-of-sql-server-database-using-c

Error : Back failed for Server

I am using smo code from this thread , but it cant backup...

My Code :

    Server s = new Server(".\\SQLEXPRESS");
    Backup bk = new Backup();
    bk.Devices.AddDevice(backupText.Text, DeviceType.File);
    bk.Database = "System";
    bk.Action = BackupActionType.Database;
    bk.SqlBackup(s);
greatmajestics
  • 1,083
  • 4
  • 19
  • 41

1 Answers1

1

Problem was of permission.. For Connecting to sql server for taking backup backup permission is required. So Kindly Check permission section.

greatmajestics
  • 1,083
  • 4
  • 19
  • 41