My application is opened and is closed immediately. It gives this error:
The application is trying to load native components of version 5692 that are incompatible with ADO.NET provider of version 8080. Incompatible versions can lead to application instability and hence loading of SQL Server Compact has been aborted. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
What is the problem? Any helps would be appreciated…
I tried SQL Server CE 3.5, 3.5 sp2, 4.0
Have you tried looking at the KB article mentioned in the error message?
http://support.microsoft.com/kb/974247
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