title: Microsoft SQL Server Database File (SqlClient) Portable String
body: <p>i have build my program with C# and the problem is that i use "Microsoft SQL Server Database File (SqlClient)" for my db and i wanted to make it portable because if i take all the project(sln) and give it to my friend to run it the database path is wrong of course..</p>
  
  <p>So i have the database.mdf inside my directory of project C# so my question is, do you know a way to do it.</p>
  
  <p>i have try to the connection string some patterns,</p>
  
  <pre><code>Data Source=.\SQLEXPRESS;AttachDbFilename="D:\blabla\blablaa\blablaaa\blablaaaa\WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2\Database1.mdf";Integrated Security=True;User Instance=True
  </code></pre>
  
  <p>so i did it like this </p>
  
  <pre><code>Data Source=.\SQLEXPRESS;AttachDbFilename="..\WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2\WindowsFormsApplication2\Database1.mdf";Integrated Security=True;User Instance=True
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Data Source=.\SQLEXPRESS;AttachDbFilename="..\Database1.mdf";Integrated Security=True;User Instance=True
  </code></pre>
  
  <p>Any suggestions. </p>