title: C# SQLite database connection WPF Crash
body: <p>Hi All hopefully someone can help me.</p>
  
  <p>I have written a small WPF app which reads the password of a SQL database and shows it on screen for the user. It works fine on the SQL DB but we have changed to use SQLite and while it works fine on my machine (on which I hav written the program) but when I give the .exe file to a user the program will crash on them, as soon as they click a button to OpenFileDiaglog() (this is so the user can select the database to retrive the password)</p>
  
  <p>After some trial and error (of commenting out parts of the code) it would seem to crash when it hits this line. </p>
  
  <pre><code> SQLiteConnection Dbcon = new SQLiteConnection("Data Source= " + Myfile);
  </code></pre>
  
  <p>but in the event viewer on the machine i am trying to run the program on the error is</p>
  
  <blockquote>
    <p>Description: The process was terminated due to an unhandled exception
    Exception info: System.IO.FileNotFoundException</p>
  </blockquote>
  
  <p>I have tried to use the .exe file on a few different machines (vista, xp, win 7) all of which have the .net framework 4.0 installed on them.</p>
  
  <p>Like I say all works perfrect on my machine only when it is moved does the error come up.</p>
  
  <p>Any help would be greatly appricated </p>