title: Error in running the project containing .sdf file on another computer
body: <p>I created a c# project in Visual Studio 2010 which contains some database connectivity. The problem is when I run the project that runs correctly and when I copy the exe file and dll file and all the files from the bin/debug folder and place in another location. and deletes the project which was the c# project and try to run the exe file the form is opening correctly but when opening the database form it is erroring with this</p>
  
  <blockquote>
    <p><em>The path is not valid. Check the directory for the database.<br>
    [ Path = E:\WindowsFormsApplication1\WindowsFormsApplication1\Database1.sdf ]</em></p>
  </blockquote>
  
  <p>It still takes the directory which I had written in the c# code. </p>
  
  <p>In the second form which is erroring with the above error i had written this code
  the file path is of connection string is same which is in error. why this is happening if it takes the path from the same folder then how can i run the project on another computer?</p>
  
  <pre><code>     connectionString = @"E:\WindowsFormsApplication1\
      WindowsFormsApplication1\Database1.sdf";
                  sqlConnection = new SqlCeConnection(connectionString);
                  selectQueryString = "SELECT * FROM table2";
                  sqlConnection.Open();
                  sqlDataAdapter = new SqlCeDataAdapter(selectQueryString,
   sqlConnection);
                  sqlCommandBuilder = new SqlCommandBuilder(sqlDataAdapter);
                  dataTable = new DataTable();
                  sqlDataAdapter.Fill(dataTable);
                  bindingSource = new BindingSource();
                  bindingSource.DataSource = dataTable;
                  dataGridView1.DataSource = bindingSource;
  </code></pre>