将受密码保护的ms访问数据库连接到asp.net。 [英] Connect password protected ms access database to asp.net.

查看:73
本文介绍了将受密码保护的ms访问数据库连接到asp.net。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想使用ms访问数据库到我的asp.net但是在使用密码保护的ms访问数据库时发生了一些错误。使用非密码保护的ms访问数据库时的工作文件。错误是无法打开数据库。它可能不是您的应用程序识别的数据库,或者文件可能已损坏。



我尝试过:



 OleDbConnection con =  new  OleDbConnection(  Provider = Microsoft.ACE.OLEDB.12.0; Data Source = D:/Database.accdb; Jet OLEDB:Database Password = 12345678 ); 
if (con.State == ConnectionState.Closed){con.Open(); }< pre>

解决方案

首先,请阅读我对该问题的评论。



我建议从这里开始:演练:创建显示访问数据库数据的网页 [ ^ ]



但是......我必须警告你:

不建议将Microsoft Access数据库用于Web应用程序!!!





有关详细信息,请参阅: ASP.NET数据访问选项 [ ^ ]


Hi,

I want to use ms access database to my asp.net but some error happened when use password protected ms access database. Work file when i use non-password protected ms access database. Error is "Cannot open database. it may not be database that your application recognized, or the file may be corrupt."

What I have tried:

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:/Database.accdb;Jet OLEDB:Database Password=12345678");
                if (con.State == ConnectionState.Closed) { con.Open(); }<pre>

解决方案

First of all, please read my comment to the question.

I'd suggest to start here: Walkthrough: Creating a Web Page to Display Access Database Data[^]

But... I have to warn you:

Microsoft Access database is not recommended for web applications!!!



For further details, please see: ASP.NET Data Access Options[^]


这篇关于将受密码保护的ms访问数据库连接到asp.net。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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