yes im kinda new to vb and hoping someone can help me, i'v tried google with no luck.

so i am creating a database program using access SQL statements to load the data, everything works perfictly except i cant figur out how to upon first install of the program the user selects the databass file location which is then saved to a string for good, iv tried messing around with the openfiledialog and it works i just dont know how to code it to only run once at install of the program so my connections string file location is saved and the database connects thanks for your help!
heres the code
cnAnime_movies.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0 ;Data Source=" & strFileLocation
where strFileLocation is going to be where ever the user selects the accdb file on install iv looked a little bit into install classes but not sure how that works thanks much!


8 Years
Discussion Span
Last Post by Ionelul

Look for an initialization file (maybe db.ini) when the program starts. If the file does not exist, accept the connections string and any other values you need, write the data to the file.

On each subsequent program starts, read the file to retrieve the values.


Thanks for the advice I'll look into the db.ini file!!


You can also try to write the path into registry and read it from there when the application starts.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.