Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

You can put the connection string in an external file (say app.settings or even a text file).
Make sure this is installed along with the product on the client.

Once that is done, you should quite easily be able to change the string.
Remember, if you are going to change the database server, you will need to change the connection string.

There is no way to avoid this change.
 
Share this answer
 
Comments
Wendelius 7-Sep-11 12:39pm    
Moved from OP's answer: "please elaborate a little i should add a text file in my project and store my machine's connection string in that?"
please elaborate a little i should add a text file in my project and store my machine's connection string in that?
 
Share this answer
 
Comments
Wendelius 7-Sep-11 12:40pm    
Instead of adding a new answer, use "Have a Question or Comment" link in the bottom of each answer to send a comment. This way the author of the comment gets notified.
You could save it to My.Settings, just add a field and just type:

VB
My.Settings.NewField = "Something..."


Or

VB
Something = My.Settings.NewField
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900