3

I have an Excel VBA tool which needs to query Oracle. I am using ADO. When building the connection string, I get the database, username, and password out of cells in the spreadsheet. What is a more secure way to handle the login?

The spreadsheet will probably be emailed and saved on public drives. Assume an ordinary Office Professional 2007 install, so using 3rd party controls is less good.

0

2 Answers 2

2

Request database, username and password through a dialog window; after successfull connection to the Oracle DB write out database and username to the registry using the SaveSetting() statement.

In the dialog window's Initialize() event preload database and username with the saved values if found, using the GetSetting() function, and move focus directly to password field

On XP/Office 2003 information will be stored in Window's registry under

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\[Appname]\[Section]

IMHO passwords should |: never :| be stored anywhere

Good luck MikeD

Sign up to request clarification or add additional context in comments.

1 Comment

I implemented the login dialog with a form. However the permanent solution was to set up shared, read-only DB logins, because the end user typically wants to browse and load data into a spreadsheet for consumption.
2

The best way would be to request the user name and password in a message box.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.