简体   繁体   English

在Visual Studio 2010 C#中找不到数据库

[英]Database Couldn't Be Found In Visual Studio 2010 C#

I've been creating an application using Visual Studio 2010 C# and Microsoft Access 2007. I am new to this and I am experiencing some errors. 我一直在使用Visual Studio 2010 C#和Microsoft Access 2007创建应用程序。对此我是陌生的,并且遇到一些错误。 I've tried using MySQL as a database before but when I changed it to MS Access 2007, there are errors occured stating that the database format is not recognized. 之前我曾尝试将MySQL用作数据库,但是当我将其更改为MS Access 2007时,会发生错误,指出无法识别数据库格式。

Here's the print screen: 这是打印屏幕: 在此处输入图片说明

The file type of the database I created is .accdb . 我创建的数据库的文件类型为.accdb Please help. 请帮忙。 Thanks 谢谢

您用于连接accdb数据库的驱动程序已过时,请安装Access 2010驱动程序 ,然后以这种方式更改您的连接字符串:

string MyConString = Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pathofyourDatabase.accdb

Either the database is encrypted or you don't have the proper Access engine for the architecture (x86/x64). 数据库已加密,或者您没有适用于该体系结构的正确访问引擎(x86 / x64)。 Visual Studio is also 32-bit and probably can't connect to x64 database. Visual Studio也是32位的,可能无法连接到x64数据库。 See this post . 看到这篇文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM