I am using access db which is in bin/debug folder and use it in code like
private static string **_strCon** = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
***Application.ExecutablePath.ToString().Substring(0,
Application.ExecutablePath.ToString().LastIndexOf('\\')) +
"\\Reporting.accdb***;Jet
OLEDB:Database Password=abc;";
and for reports I use DataSet which is using connectionstring from app.config like
<add name="GarzaReportingSystem.Properties.Settings.ReportingConnectionString"
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;***Data Source=|DataDirectory|\bin
\Debug\Reporting.accdb***;Persist Security Info=True;Jet OLEDB:Database Password=abc" providerName="System.Data.OleDb"/>
PROBLEM:
When I make setup of the project and than install the application. I need to put Reporting.accdb in root folder in order for my forms to work using _strCon. In Other words my Executable path becomes root folder
But for DataSet
I need to put access db in bin/debug folder for it to work when application is installed.
How to solve this problem so both resolve same path like root has folder DataBase and both use that path.