Click here to Skip to main content
12,955,170 members (58,925 online)
Rate this:
Please Sign up or sign in to vote.
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
Updated 24-Jul-12 2:16am

1 solution

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

Solution 1

Do you mean something like Entity Framework in WinForms[^]


adadero 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 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 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 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 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 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.
Juhi Paunikar 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
Top Experts
Last 24hrsThis month
OriginalGriff 6,559
CHill60 3,550
Maciej Los 3,153
ppolymorphe 2,030
Jochen Arndt 1,975

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100