-
[RESOLVED] App Path
Hello!
I have this code (it's not important for what)
Code:
Me.OleConnection.ConnectionString = "Data Source=""C:\Program Files\bin\Debug\base.mdb""; Jet OLEDB:Engine Type=5;" & "Provider=""Microsoft.Jet.OLEDB.4.0"";"
And how to make app (relative) path? Database will be in the same directory with .exe application.
Thanks!
-
Re: App Path
Code:
Me.OleConnection.ConnectionString = "Data Source=" & Application.StartupPath() & "\base.mdb; Jet OLEDB:Engine Type=5;" & "Provider=""Microsoft.Jet.OLEDB.4.0"";"
-
Re: App Path
Just an FYI that the program files directory is NOT the place to store a database file.
It won't work right in Vista or Windows 7, (or XP if you aren't an admin for that matter).
The program files directory is readonly unless you have admin permissions.
The proper place to store the database file would be in the users data folder, or the program data folder that is global to the system.
-
Re: App Path
Thank you for replay. :):wave: