Solved

modify connection string for a dataset

Posted on 2012-04-05
6
391 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
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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Replication question 9 43
Query group by data in SQL Server - cursor? 3 34
Help with adding DLL file in Windows project 20 31
MailAddress in vb 4 15
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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.

777 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