I have created a Windows application with an Access Database and the program performs perfectly prior to package and deploy. After being deployed, from the installation folder, I try to run the application, and as it is trying to load from the database I receive an error that states “could not find” and it’s the application path to the database. It’s like it is not seeing the database. Any suggestions?
Deploy a vs.net 2003 Windows application with Access database
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Scott LysleRank #49 · 31K reputationPosted Dec 15, 2007, 6:43 AM EST
Robert:
What is the path pointing to the database; are you using Application.StartupPath to point to it? In the development environment that would be pointing at the bin folder but not so when it is deployed; since the message is telling you it cannot find the database you might have a look at that.
Robert Neitzel4 reputationPosted Dec 15, 2007, 8:28 AM EST
Scott: Here is the path I use which is the app path:
Private AddressConn As OleDbConnection = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=..\AddressData.mdb;")
when the deploy app tries to load the error is
("could not find C:\Program Files\AddressData'.")