Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

modify connection string for a dataset

Posted on 2012-04-05
6
Medium Priority
?
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

609 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