设置DBMS密码 [英] Setting DBMS Password

查看:97
本文介绍了设置DBMS密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已更新

这是我的问题.

我将为使用MS Access 2007创建的数据库设置一个 密码.将放置在我的"连接字符串''语句,该语句在 ADO.NET 2.0 中使用 VB 2005 .但是,如果我更改密码,我将必须重新创建我的设置文件,并将新版本安装到计算机上.

我听说,这种信息(DBMS密码)可以存储在 XML文件中,然后该XML文件可以被读取以获取密码.如果重置了DBMS密码,仅需编辑仅该特定的 XML文件.然后无需重新编译或创建新的安装文件.

在ASP.Net 2.0中,有一个名为appConfig的选项.但是我将开发Windows应用程序而不是Web应用程序.

所以我想知道如何以及将DBMS密码存储在XML中的位置.
另外,我想知道如何读取特定的XML文件和密码,以及在
放置XML文件的位置. 系统正在开发中.



如果有人想帮助我,不要以为这是一个天真的想法!

非常感谢!

Updated

This is my question.

I will set a password to my database created using MS Access 2007. I will place at my ''Connection-string'' statement which in ADO.NET 2.0 using VB 2005. But if I change the password I will have to recreate my setup file and install the new version to the computer.

I heard that, that kind of information (the DBMS password) can be stored in an XML file and then that XML file can be read to get the password. If the DBMS password reset, only have to edit that particular XML file only. Then no need to recompile or create a new setup file.

In ASP.Net 2.0 has a option called as appConfig. But I will develop windows application not web application.

So I want to know how to and where should store my DBMS password in the XML.
Also I want to know how to read that particular XML file and the password and where should i place that XML file when the
system is being developed.



If any you guys want to help me don''t think this is a naive idea!

Thanks a lot!

推荐答案

您可以使用任意方式存储密码.如果您知道如何将数据读取和写入文件,那么一切都准备就绪. XML是一种选择,但我敢肯定您会想到其他选择.

执行此操作的"Microsoft"方法是使用应用程序的设置文件.

应用程序设置概述 [如何:使用设计器创建应用程序设置 [ ConnectionStringBuilder [ ^ ]
You can store the password any way you want. If you know how to read and write data to a file, you''re all set. XML is one option but I''m sure you can think of others.

The "Microsoft" way of doing this is using the application''s settings file.

Application Settings Overview[^]

How to: Create Application Settings Using the Designer[^]

Then just read the password and add it to your connection string, or use a ConnectionStringBuilder[^]


这篇关于设置DBMS密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆