0

Hi guys,
i'm having a difficulty to set the path in vb.net.i put the code in the module
and every time i run the code it throws error
"Could not find file 'C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\Adigrat.accdb'."
here's the code

Public conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source= .\Adigrat.accdb;Persist Security Info=False")

4
Contributors
6
Replies
29
Views
3 Years
Discussion Span
Last Post by Nebil
Featured Replies
  • Hi Are you using a common networked database for all users? Or is it that you are deploying the database with the program i.e. one database per user? Read More

0

Are you sure the path is correct?

You can verify it by doing this:

If File.Exists("C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\Adigrat.accdb") Then MsgBox("It is there!") Else MsgBox("Path May Be Wrong!")
0

My idea is that when you try to run the application on other pc how do you set the path?

1

Hi
Are you using a common networked database for all users? Or is it that you are deploying the database with the program i.e. one database per user?

Comments
Forgot to ask! :)
0

A few things to check:

  • Is the file in the programs's Debug folder?
    C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\
  • If not, are you selecting 'Copy to Output'.
0

i just tested that it runs currently well.but i was just curious that i had a sample vb.net app that runs fine without putting the db in debug folder.anyway tnx a lot

This question has already been answered. Start a new discussion instead.
Be sure to adhere to our posting rules.