?
Solved

modify connection string for a dataset

Posted on 2012-04-05
6
Medium Priority
?
400 Views
Last Modified: 2012-06-27
I am new to vb .net. Here is a problem i am faced with.

I am creating a windows form application using Visual Studio 2010. I created datasets from the IDE and the connection string points to a development database. Now I want to modify the connection string so it points to the production database. How shall i do this? I am quite lost. Thank you very much!
0
Comment
Question by:selfstudy
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 37814602
How shall i do this? I am quite lost.
Don't hard-code your connections string.  Save your connection string in the configuration file.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37815846
0
 

Author Comment

by:selfstudy
ID: 37829515
thank you both for answering my question.

yes, the connection string is already in my app.config file. so i guess i just need to modify the connection string in app.config. Is it safe to embed the password in the app.config file? thanks.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 2000 total points
ID: 37830538
Is it safe to embed the password in the app.config file?
That depends who can view it and what permissions are allowed for that user.  You can of course encrypt the password or the connection string for that matter if you prefer...
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question