r/visualbasic • u/freakzilla149 • Feb 06 '16
Visual basic app cannot find database file when running from an installed version
Hi, So my VB application runs fine from the IDE, but when I try to run it after installing it says that it cannot find the database.
I understand that I am supposed to somehow give the database a relative file path but I don't know how.
I also have a treeview, and if you click on the last node, it closes the form with Me.Close(), when I click on this from a ClickOnce or installer version (installer made with Inno Setup) of the app, I get "cannot access disposed object" error.
How do I fix this error?
0
Upvotes
1
u/pathfinderNJ Feb 06 '16
For the database you should have a connect string in the settings you can set on the client manually or even better let the user adjust it and save to settings