How to backup from .mdf database that I created
<p>I created a <code>.mdf</code> database file with Visual Studio 2008. I can retrieve and insert data into database but when I want to backup I receive an error.  </p>

<p>My code: </p>

<pre><code>string con = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|C:\test\Data|\DB.mdf;Integrated Security=True;User Instance=True";

connect = new SqlConnection(con);
connect.Open();

SqlCommand command = new SqlCommand(@"backup database [" + System.Windows.Forms.Application.StartupPath + "\\Data\\DB.mdf] to disk ='"+str+"' with init,stats=10",connect);
command.ExecuteNonQuery();
connect.Close();

MessageBox.Show("The support of the database was successfully performed", "Back", MessageBoxButtons.OK, MessageBoxIcon.Information);
</code></pre>

<p>The error is:</p>

<blockquote>
  <p><em>error : invalid value for key 'attachdbfilename'.</em></p>
</blockquote>
