re coding required to find access database on deployment

caramia

Member
Joined
Jun 30, 2006
Messages
5
Location
London UK
Programming Experience
Beginner
Quote:
Originally Posted by JuggaloBrotha
i know this is kind of old/late but what i do is on application startup i have it modify the database connection string(s) in code to look for the database(s):
cnn.Close()
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Database.mdb"
cnn.Open()


I also am having problems making my deployed application run on the new machine because the connection strings are different. I found the above instructions in my search of your forum for the answer. I would now like to know where to insert this code. Is it on each form that refers to a database or is it on the startup screen form? :confused: Do I have to declare anything else? Sorry this is my first attempt and I need your help. My application works fine until it has to refer to an access database(I have 2 of them). I am using VB 2003. Many thanks for your help.
 
What I did when I had a similar problem is to get the name of the folder where the application is installed and create a folder with the same name and put my database in it and the create the connection.
 
Back
Top