title: Create connection string for MS-Access dynamically
body: <p>How can we create a connection string to the Microsoft Access using C# programming dynamically? I tries the following code-</p>
  
  <pre><code>OleDbConnection con = new OleDbConnection();
  String path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
  con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + "\\nik.mdb";
  </code></pre>
  
  <p>I got this result in response:</p>
  
  <pre><code>Format of the initialization string does not conform to specification starting at index 55.
  </code></pre>
  
  <p>When i edit my string it looks as below:</p>
  
  <pre><code>Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Users\nikhil\desktop\nik.mdb
  </code></pre>
  
  <p>Thanks in advance.</p>