You could store it in an xml file in the application data directory or in the
registry.
When you go to check your password against what has been entered by the
user, don't forget to call 'ZeroMemory' to wipe it from memory
Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" _
(ByVal Destination As String, ByVal Length As Integer)
ZeroMemory(txtPassword.Text, txtPassword.Text.Length * 2)
This clears the password entered into txtPassword (TextBox) & writes twice
the length of zeros
"Bob Hollness" wrote:
encrypt it using the encryption classes in .NET and store it in an external
file. That way you only need to change the file.
--
Bob
--------------------------------------
I'll have a B please Bob.
<kr*****@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...I have a console application in VB.NET that I have hard coded the
username/password for the SQL database. Haven't been programming for
long, so don't know much about the tools available.
The password will be changed regularly. Is there a way to store the
password, or grab it from somewhere so that the program will not have
to be recompiled everytime the password is changed? Any suggestions
would be appreciated.