I’m using LINQ in visual studio using the DataClasses
Where can I change the connection string from the code?
I’m using LINQ in visual studio using the DataClasses Where can I change the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to add a connection string to your project’s App.config or Web.config, then when you instantiate your data context, you should be able to supply the name of the connection string to use. e.g.:
App.config:
Code using data context