Hi!!
Actualy there are sevaral ways u can do it. First is u can define ur connection varibale in a vb module. Other way is, declare connection variable as shared.
In the case of connection string one way is the way is the way u mentioned. That is, defined it in app.config file. U can modify it at any time without recompiling the programme. Other way is. since in connection string, the changing variables are host name / DB name. So u can define those in an outside XML file and when application loading, u can read that xml file and can extract host name and the DB name. Then u can make the connection string.
Hope this would help u !!
Enter your message below
Sign in or Join us (it's free).