title: The file name is not valid. Check the file name for the database. [ File name = E:\\PractDB.sdf ]
body: <p>I know there is already a post <a href="https://stackoverflow.com/questions/22435775/the-file-name-is-not-valid-check-the-file-name-for-the-database-file-name">here</a> for similar issue. However mine issue is on development computer itself.</p>
  
  <p>We have a client requirement of developing database driven application for Motorola MC 65 (Window CE os) devices.</p>
  
  <p>Following internet have been able to run a empty form application on the device (device attached to cradle). </p>
  
  <p>I created a SQL Server Compact database, added a table and filled data into it. Through Visual Studio Server Explorer established connection successfully.</p>
  
  <p>However through code I'm getting an error.</p>
  
  <p>Below is my connection string code:</p>
  
  <pre><code>SqlCeConnection con = new SqlCeConnection();
  
  con.ConnectionString = @"Persist Security Info = False;
                           Data Source = 'E:\\PractDB.sdf';
                           Password = 'password#123'; 
                           File Mode = 'shared read'; 
                           Max Database Size = 256; 
                           Max Buffer Size = 1024";
  
  con.Open();
  </code></pre>
  
  <p>Kindly let know what I am missing. What is the correct way to reference a <code>.sdf</code> database file in the connection string?</p>