我的应用程序已打开并立即关闭。它给出了这个错误:
应用程序正在尝试加载与版本8080的ADO.NET提供程序不兼容的版本5692的本机组件。不兼容的版本可能导致应用程序不稳定,因此SQL Server Compact的加载已中止。安装正确版本的SQL Server Compact。有关更多详细信息,请参阅知识库文章974247.
有什么问题?任何帮助将不胜感激......
我尝试过SQL Server CE 3.5,3.5 sp2,4.0
答案 0 :(得分:2)
您是否尝试查看错误消息中提到的知识库文章?
http://support.microsoft.com/kb/974247
CAUSE Compact based applications generally program against the Compact ADO.NET provider (System.Data.SqlServerCe.dll). This provider in-turn communicates with the native Compact components. In order to avoid various inconsistencies, a Compact ADO.NET provider of a certain version can talk only to the Compact native components of the same version. The following are some sample scenarios where this policy will be broken, and that will result in one of the previously mentioned two exceptions:
Resolution At any given point of time, the correct state of a 64-bit computer, for SQL Server Compact, would be the following: Both x86 and amd64 MSIs are installed. Both x86 and amd64 MSIs are of the same version. Therefore, if you face any similar issues, make sure that the computer has both x86 and amd64 MSIs of Compact are installed and they are of the same version. In case, they are not, then install Compact SP2 x86 and x64 MSIs from following link as needed: http://www.microsoft.com/downloads/details.aspx?familyid=E497988A-C93A-404C-B161-3A0B323DCE24&displaylang=en