Solved

modify connection string for a dataset

Posted on 2012-04-05
6
394 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
Row insertion failed. Array 5 46
SQL Quer 4 21
HTML <font style="color:red"> 9 30
SQL View / Qtry 3 10
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

839 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