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.

Recommended Answers

All 7 Replies

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).

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 ?

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.

didn't got u ?

windows application i am using modules and consume?please elaborate

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


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


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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.