Im looking for a way to tell the connection wizard, specifically the part about telling it where the db file is, that I want it to look in the application path for the file.
These wont work:
Application.startuppath & \dbdata.mdb
Application.startuppath & "\dbdata.mdb"
I had created a whole app that took me quite a while only to find out that when I deployed it, it is still looking in the bin directory of the project for the database file.
I also tried just adding a new connection string redefining the connection in the form_load method (see below) but that throws an exception when trying to fille the dataset.
OleDbConnection2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Application.StartupPath & \dbdata.mdb;User Id=admin;Password=;"
Im convinced there has to be a way to set the correct path in the wizard.
These wont work:
Application.startuppath & \dbdata.mdb
Application.startuppath & "\dbdata.mdb"
I had created a whole app that took me quite a while only to find out that when I deployed it, it is still looking in the bin directory of the project for the database file.
I also tried just adding a new connection string redefining the connection in the form_load method (see below) but that throws an exception when trying to fille the dataset.
OleDbConnection2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Application.StartupPath & \dbdata.mdb;User Id=admin;Password=;"
Im convinced there has to be a way to set the correct path in the wizard.
Last edited by a moderator: