Click here to Skip to main content
15,501,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Updated 24-Jul-12 3:16am
v2

1 solution

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

Cheers

S
 
Share this answer
 
Comments
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     CRLF
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     CRLF
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     CRLF
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.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900