title: Is there a universal connection string for different computers to connect to a local database using my program developed by vs2010
body: <p>newbie here.</p>
  
  <p>I have a local db in my program. Whilst I was developing the program I used the SQL </p>
  
  <p><strong>Connection string :</strong></p>
  
  <pre><code>SqlConnection sconn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\leemk_000\Documents\......Integrated Security=True;User Instance=True;");
  </code></pre>
  
  <p>Now If I want to load this program onto a different computer I am sure that this connection will no longer work simply because it will still be looking for <code>Users\Lee_000\</code></p>
  
  <p>I have tried to remove Lee_000 but I get this following <strong>error:</strong></p>
  
  <blockquote>
    <p>An attempt to attach an auto-named database for file C:\Users\Documents..... failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.</p>
  </blockquote>
  
  <p>What can I do to get a connection string to work on different computers.</p>
  
  <p>With many thanks</p>