title: OleDb connection string for a local file
body: <p>Using OleDb I am connecting to MS Access (v2003) database and my Project folder is <code>MyHotApps</code> and my OleDb Connection String is</p>
  
  <p><code>MyConString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\Users\Some User\Documents\Visual Studio 2010\WebSites\MyHotApps\Database\MyDbFile.mdb'";</code></p>
  
  <p>As mentioned above my Project folder is <code>MyHotApps</code> and database file <code>MyDbFile.mdb</code> is located in <code>Project_Folder&lt;MyHotApps&gt;\Database\MyDbFile.mdb</code></p>
  
  <p>So, its too local for me that database file is inside the project folder and I need a <strong>Portable Connection String</strong> where ever I take the project folder I shouldn't rewrite Connection String for that I tried the below manner which didn't work</p>
  
  <p><code>MyConString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source'=~Database\MyDbFile.mdb'";</code></p>
  
  <p>Can anybody help me how to build a <strong>Portable Connection String</strong> I read some forms that says Database file should be placed inside App_Data file and I don't know how to do that also. Anybody please tell me someway to build portable connection string.</p>