App.config path not correct (1 Viewer)

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:13
Aug 22, 2019
I am very new to visual studio and i am building a data entry app in it using visual studio connected to Microsoft access database (VB.NET language). But i am getting error during initial debug to check on the path like below:

System.Data.OleDb.OleDbException: ''C:\Users\ramadasr\source\repos\Test2\bin\Debug\Database\Trialdatabase.accdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
And I have entered the app.config data correctly like below:

connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\database\Trialdatabase.accdb"

And actual folder location is this: C:\Users\ramadasr\source\repos\Test2

Please help me how to correct this , i have attached some images also for your reference.

Users who are viewing this thread

Top Bottom