wrong path "|DataDirectory|\db.accdb" System.Data.OleDb.OleDbException was unhandled
In new project like WindowsApplication there is no problem with adding DataGridView and then adding Access datebase to it.
But in my plugin I cannot do that. I had to add manualy line to Load event for filling table:
But it cannot locate may database file (*.accdb)
Adding database generated files Settings.settings and app.config were I can find:
How to fix that |DataDirectory|? Becouse it's returning wrong path to my database file.
But it seems to be the same code in new WindowsApplication project and there is no problem...
In new project like WindowsApplication there is no problem with adding DataGridView and then adding Access datebase to it.
But in my plugin I cannot do that. I had to add manualy line to Load event for filling table:
VB.NET:
Me.KwerendaTableAdapter.Fill(Me.DmwbdDataSet.Kwerenda)
But it cannot locate may database file (*.accdb)
VB.NET:
System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147467259
Message=Could not find file 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\dmwbd.accdb'.
Source=Microsoft Office Access Database Engine
Adding database generated files Settings.settings and app.config were I can find:
VB.NET:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\dmwbd.accdb"
But it seems to be the same code in new WindowsApplication project and there is no problem...