Wednesday, March 28, 2012

Saving ODBC password

I have an app that uses ODBC for connection. Everytime the users log in it prompts the user to enter a password.

Is there any way (reg key entery ?) for the password to be saved so the user is not prompted?

Thanks

MPM

No, I'm sorry you can't do that. This is a security issue, since someone may gain access to your registry information, and thereby uncover your password. Even if you modified your registry information to store the password ODBC would not read that information.

I can't think of a work-around, unless you had a VB script or something that automatically logged on to a database? Perhaps you could use trusted connection instead of UserID/Password connection?

Hope this helps.

~Warren

|||There is no way to save the ODBC password in the registery. But you can do somethings to avoid this.

1. If you have a logon screen in your app. You can use the same password to get access to your app and to get access to your DB. If you do that you can just store the user/pass used to get access to the app and use it for the ODBC.
2. You can use trusted connection if you are using a Domain Controller, this is the easiest way.
3. You can code a box that opens instead of the default ODBC password request box and store the password in a MDB file.

Here's my suggestions.

Regards

JB

No comments:

Post a Comment