Solved

modify connection string for a dataset

Posted on 2012-04-05
6
390 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
6 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
0
 

Author Comment

by:selfstudy
Comment Utility
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 500 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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 to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now