App.config path not correct (1 Viewer)

Ravi Kumar

Registered User.
Local time
Today, 14:22
Joined
Aug 22, 2019
Messages
157
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"
YZX2A.png

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 (Users: 0, Guests: 1)

Top Bottom