title: OS error 3 when backing up database
body: <p>It is a follow-up question to my previous question in the same forum.</p>
  
  <p>I would like to take a backup of my SQL Server database. Here is the code, for the backup in C#.</p>
  
  <pre><code>userConn = new SqlConnection(userdatabase);
  userConn.Open();
  
  string UserString;
  
  UserString = "BACKUP DATABASE @DBName TO  DISK = @FilePath";
  
  String destPath = DestDirectory + "\\UserDataTable.bak";
  SqlCommand cmd = new SqlCommand(UserString, userConn);
  
  cmd.Parameters.AddWithValue("@dbName", userConn.Database);
  cmd.Parameters.AddWithValue("@FilePath", destPath);
  
  cmd.ExecuteNonQuery();
  cmd.Dispose();
  </code></pre>
  
  <p>However, it throws an SQLException, </p>
  
  <blockquote>
    <p>"Cannot open backup device
    'D:\BookKeeping\Database\11_01_2013_21_15\Database\UserDataTable.bak'.
    Operating system error 3(failed to retrieve text for this error.
    Reason: 15105). BACKUP DATABASE is terminating abnormally."</p>
  </blockquote>
  
  <p>Any Idea, what could be wrong ? </p>
  
  <p>Thanks a lot for your time and your help.</p>