Cristiano Coelho
Cristiano Coelho

Reputation: 1735

SQL server CE 4.0 windows XP

i have made a WPF application which works fine on windows7 and XP. However, after adding some functionality related to databases and entity framework it still runs under windows 7 but not on windows XP. Every time it tries to use the database i get a "Operation is not supported on this platform".

I have added all the dlls needed and modified the .config as you can see so the app can run without sql server CE 4.0 installed. I have tried installing sql CE on the windows xp machine as well and edit the .config to use it instead of the dlls, but i get same result.

More info: The app is made to run on .net framework 4.0

Should i try another embedded DB?

<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SqlServerCe.4.0"/>
      <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
    </DbProviderFactories>
  </system.data>
  <connectionStrings>
    <add name="Conexion" connectionString="Data Source=|DataDirectory|Database.sdf" providerName="System.Data.SqlServerCe.4.0" />

  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>

Upvotes: 1

Views: 1040

Answers (1)

Cristiano Coelho
Cristiano Coelho

Reputation: 1735

Ok i found the problem. Seems like sql server CE 4.0 needs windows XP SP3, and the test machine only had SP2, shame on me!

Upvotes: 1

Related Questions