Friday, March 30, 2012

Saving the username and password in the DSN

I am wrting a vb application that connects to an MSDE database. I am using
ADO for the data objects and an OBDC DSN entry for connecting to the
database. Is there a way to store the username and password in the DSN entry
so that I do not need to supply this in code?
Alternatively, is there a simple, fast and efficient way to encrypt a
connection string if I cannot store this in the database. I do not want to
store the connection string in the code. It is too limiting.
Thanks.
For security reasons, the user name and password are not stored in DSN's.
Anyone can access this information via the registry (for example,
HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\DSN_Test1 23)
Copying the user name and password to the DSN would allow anyone to see
this information.
I don't think drivers even try to read this information from the DSN's even
if you did store it there.
I'm pretty sure you need to enter this information every time you connect.
sql

No comments:

Post a Comment