Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-CE .NET
Hi.
In my application I'm using Sql CE as my database. Unfortunately, I can add datasource for my Entity Data Model (I can add physical database but I can't add datasource for EF). I tried to find information about this problem and I found many blogs explaining how to fix it but it isn't solved.
I have installed SSCERuntime, SSCEVSTools, SSCEWebTools, WebMatrix_1_13x86 as suggested in Here[^] and Here[^] . I'm using visual studio 2010 SP1. I also have SqlServer 2008R2 and SqlServer 2012 installed in single computer. Any other solutions?
Posted 24-Jul-12 2:14am
adadero493
Edited 24-Jul-12 2:16am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Do you mean something like Entity Framework in WinForms[^]
 
Cheers
 
S
  Permalink  
Comments
adadero at 24-Jul-12 9:20am
   
Yes, winform application. That link doesn't help me. I Generate Database from Model it generates Sql statement and when I try to connect to Database.sdf (version 4.0 not 3.5) it fails due to unsupported database version.
Estys at 24-Jul-12 9:35am
   
Your question didn't mention any error, you should give a detailed description of the error.
Does your project reference the right assemblies (4.0 instead of 3.5) and is it targeting that version?
adadero at 24-Jul-12 9:44am
   
Here's the error: This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine. (SQL Server Compact ADO.NET Data Provider)
Yes off course, 4.0 as target framework.
Estys at 24-Jul-12 10:29am
   
That error is almost exlusively associated with SSMS. I'm a bit confused now.
It must be some configuration issue, for instance the connectionstring.
adadero at 24-Jul-12 10:54am
   
Do you have an idea how to fix it? I'm using Entity Framework (Linq To Sql) with SqlCe as my database.
Estys at 24-Jul-12 11:05am
   
I think not, these kind of issues mostly have no general solution. I would have to have access to your installation and that's not possible.
Whenever I have such problems either I go on a ghosthunt (my expression for finding strange bugs) or (if it's not too much effort), try to rebuild from scratch, debugging after every step I've made and see if I can spot the problem arising.
Sorry
Juhi Paunikar at 18-May-13 2:32am
   
getting same error while using web matrix with compact framework.. :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 589
1 OriginalGriff 339
2 CPallini 205
3 RyanDev 165
4 Sergey Alexandrovich Kryukov 160
0 OriginalGriff 5,689
1 Sergey Alexandrovich Kryukov 4,783
2 Peter Leow 2,954
3 Maciej Los 2,819
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 24 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid