How to make relative path to database in app.config using SQLite/entity framework

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Drees
    New Member
    • Feb 2011
    • 1

    How to make relative path to database in app.config using SQLite/entity framework

    I want to be able to use a relative path to use a SQLite DB on more than 1 pc. the connectionstrin g in the app.config looks like this now:
    Code:
    <add name="DBPersonEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SQLite;provider connection string='data source=&quot;C:\Users\Dreeze\Documents\Test DB2\DBPerson.s3db&quot;'" providerName="System.Data.EntityClient" />
    The DB file is in the same folder as the app... i would like to make the path relative so it refers to the apps folder. Can anyone help me change this connectionstrin g?
Working...