Excel VBA:获取用户数据库登录/连接字符串密码的安全方式? [英] Excel VBA: Secure way to get user's database login/password for connection string?
问题描述
电子表格可能会通过电子邮件发送并保存在公共驱动器上。假设普通的Office Professional 2007安装,所以使用第三方控件不太好。
通过对话窗口请求数据库,用户名和密码;在与Oracle DB成功连接后,使用SaveSetting()语句将数据库和用户名写入注册表。
在对话窗口的Initialize()事件预加载数据库和用户名使用GetSetting()函数找到保存的值,并将焦点直接移动到密码字段
在XP / Office 2003上的信息将存储在Window的注册表中, p>
HKEY_CURRENT_USER\Software\VB和VBA程序设置\ [Appname] \ [Section]
IMHO密码应该|:never:|存储在任何地方
祝你好运MikeD
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.
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
这篇关于Excel VBA:获取用户数据库登录/连接字符串密码的安全方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!