We help IT Professionals succeed at work.
Get Started

VB.NET Retrieving and Storing Database Credentials

Last Modified: 2015-03-03
I have an application I'm working on that connects to an SQL Server Express 2013 Database.  Currently, I have hard coded the connection string into a settings module.  This works, but it has draw backs.

1. If a user wants to take this program and connect to a different database, it needs to be recompiled for them.
2. I don't know how secure it is.
3. If the password on the database changes, we have to recompile...

And so on.

The first time a user uses the program, I could prompt for a connection string, username and password.  But where would/should I store that - and what would be the most secure method.  

I'm assuming there are several different ways to answer this question, and from my research it seems that no way is really fool proof.  So, any suggestions would be appreciated!

Thank you for your help!!!
Watch Question
This problem has been solved!
Unlock 2 Answers and 4 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE