I need to configure the executable so that at each installation the VB
program can find the database server, change the connection string to point at the local server named in the config file.
I am sure you have all done this before but to me it is new stuff.
1. What is a good name and location for the configuration file with
the server name?
2. I make the
Public objConnection As New SqlClient.SqlConnection()
at the public class so the I can use it in several forms. True?
But then I need to execute the read config at the Load event so I can
add the server name to the connection string.
3. What is the syntax for modifying the objConnection to use the new string with the server name that I just read from the config file?
objConnection = strConnectionString < This doesn't work.
4. What is the best way to edit the strConnectionString to insert the server name found in the config file?
5. Is there an easy example available of program which does this stuff?
Thanks in advance,