I am trying to get this line in my web.config file to use a relative path instead of hard-coded, but nothing works. I can find material for SQL and mySQL DB
<connectionStrings> <add name="dbConnection" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Mike\Desktop\GeauxEat NEW\GeauxEat\App_Data\GeauxEatAccessDB.accdb"/> </connectionStrings>
I tried to do it
<add name="dbConnection" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|Data Directory|\GeauxEatAccessDB.accdb"/>
but then it searches for something in this folder where it does not exist.
"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\DevServer\\10.0"
Is there any way to get this relatively? It is located in the AppData folder of the project file.
source share