0

i m using Microsoft VS 2008 and in that VB.NET as the language
the problem is i m not able to store connection string every time machine changes have to keep on changing the connection string


i have searched browsed, surfed done everything but still not able to find the proper answer

please help!!!

thank you.

3
Contributors
7
Replies
9
Views
6 Years
Discussion Span
Last Post by naazsayed
0

How do you store your connection string?
There are a number of ways to store the connection string and it some of them you can include it to the project (settings, xml or ini file, or even registry values that you create in your code if they are not present).

0

yes it is there but everytime the path changes so is the connection string so cant keep changing all the time its a lenghthy project so what to do ?

0

Declare connection string in module level and consume in all the forms.If at all it changes u need to change only in the module not in all the forms.

0

windows application i am using modules and consume?please elaborate

0

If the path is relevant to where your app is stored, then you can use the

Application.StartupPath()

or if your are looking for user's folder you can use

System.Environment.SpecialFolder.Personal

and navigate yourself from there.
What is the connection string used to connect to?

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.