如何在受密码保护的Access数据库中使用c#? [英] How to use c# with password protected Access Database?

查看:91
本文介绍了如何在受密码保护的Access数据库中使用c#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发的其中一个应用程序即将完成……直到现在,我一直在使用Access数据库而不指定密码.但是,对于最终版本,我希望使用一个密码来保护它.问题是,我尝试在Access中设置密码,没关系. VStudio中的向导,但是即使连接测试正常,当尝试运行该应用程序时,我也会收到类似无效密码"的错误消息.
有任何想法吗?我使用的密码类似于"aaaaaBbbbb",只有文字,没有数字.

解决方案

就像FYI一样,访问系统密码也不是那么安全.您可以轻松快速地下载免费的实用程序,以在任何Access数据库中显示密码.他们很东进.如果您想要一个示例,请参见此处L 下载访问密码检索LITE [ connectionString =新的OleDb.OleDbConnection(" + " + dbLocation + " +密码)



如果要使用文件,最好对其加密并解密.例如:
如何使用Visual C#加密和解密文件 [就在此处 [ Any Ideas? The password i used is something like "aaaaaBbbbb", only literals, no numerals.

Just as an FYI, access system passwords aren''t all that secure. You can easily and quickly download a free utility to show the passwords in any Access database. They''re very east to get into. If you want an example see hereL Download Access Password Retrieval LITE[^]

Just as an example though...here''s one way to provide the password:

connectionString = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
                                             "DataSource=" + dbLocation +
                                             ";Jet OLEDB:Database Password=" + password)



You''d be better off encrypting the file and decrypting it when you want to use it. An example at: How to encrypt and decrypt a file by using Visual C#[^]


You put the password in the connection string.


As always, the answer to DB connection questions should be right here[^].

:)


这篇关于如何在受密码保护的Access数据库中使用c#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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