Questions tagged [sql-server-ce-4]

Microsoft SQL Server Compact version 4 is a SQL Server embedded database for building standalone and occasionally connected applications for mobile devices, desktops, and Web clients.

Use this tag if you encounter issues specific for version 4.0 of sql-server-ce. For not version specific issues use the generic tag .

The tag would be primarily used for questions addressing these features:

  • Using CE in combination with Microsoft WebMatrix
  • Designer and debugging capabilities in Visual Studio
  • Medium or partial trust environments in the web servers
  • Sit-by-site deployment
  • The SHA2 encryption algorithms for encrypting the databases
  • T-SQL syntax for OFFSET and FETCH
  • New APIs like SqlCeConnection.GetSchema
  • Server generated keys like identity, rowguid etc.

Taken from the download page

254 questions
6
votes
3 answers

Entity Framework 4.1 "Code First" SetInitializer not being called again after Database.Delete

Trying to do some unit testing with EF 4.1 code first. I have my live db (SQL Server) and my unit test DB( Sql CE). After fighting (and losing) with EF, Sql CE 4.0 and Transaction support I decided the simplest way to run my test was to: Create Db…
ozczecho
  • 8,649
  • 8
  • 36
  • 42
6
votes
2 answers

What are required assemblies for Entity Framework 4.1 and SQL Compact?

Previously I used Entity Framework 4.0 CTP5 (code-first) and SQL Compact in my projects. I had the following packages installed using NuGet: SQLCE.4.0.8435.1 (version 4.0.8435.1) EFCodeFirst 0.8 (version…
6
votes
2 answers

Saving DateTime with WebMatrix and Razor

I am developing a project that has a DateTime field. In it I'm using jQuery for the user to select the date format 'dd/MM/yyyy' taking into account that the date is not a required field. How do you do to save DateTime fields not required in…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
6
votes
1 answer

EntityFunctions.TruncateTime alternative when using EF CTP5 with Sql Server Compact Edition 4.0

I'm using EF CTP5 code-first with Sql CE 4.0. I am trying to perform a time-insensitive date comparison between two DateTime properties. As linq to entites cannot parse the DateTime.Date property (which would have been nice) the solution is to use…
6
votes
2 answers

How to get values alternate for ROW_NUMBER()?

I have a table with values like these: Name Order Innings Suresh 1 1 Ramesh 2 1 Sekar 3 1 Raju 1 2 Vinoth 2 2 Ramu 3 2 I want the result be like this: 1stInn 2ndInn …
DineshDB
  • 5,998
  • 7
  • 33
  • 49
6
votes
1 answer

SQL Server CE 4.0 deployment issue--which files are necessary?

I'm trying to deploy a small Windows Form app that uses a SQL Server CE 4.0 database. I don't want every system running this application to have to install SQL Server CE 4.0, so I'm trying to get any required DLLs included with the application.…
Ben
  • 659
  • 8
  • 24
6
votes
2 answers

How to use dynamic connection string for SQL Server CE?

I used SQL Server CE 4.0 in my windows app and use Entity Framework to create a model of it. It works fine but my problems is that it doesn't have a constructor to change the connection string, and by default it reads the connection string from the…
motevalizadeh
  • 5,244
  • 14
  • 61
  • 108
5
votes
1 answer

Sql trace using Entity Framework 4.1 against SQL Server CE 4

Without using an external tracer such as SQL Profiler or EF Profiler. Is there a way of tracing the SQL for the statement below using EF 4.1 against an SQL Server CE database? int count = context.Customers.Count();
Darren Lewis
  • 8,338
  • 3
  • 35
  • 55
5
votes
1 answer

EF 4.1 code-first SQL ce 4.0 update collection exception

I'm using EF 4.1 code first with SQL ce 4.0 I have two classes public class Customer { public int ID { get; set; } public string CompanyName { get; set; } public List ContactPersons { get; set; } } public class…
Francesco
  • 964
  • 2
  • 17
  • 41
5
votes
2 answers

SqlCeParameter return Auto ID (Primary Key)

I have an SQL SqlCeParameter statement for example: mySQLCommand1.CommandText = @" INSERT INTO clientSubjectiveComplaints (clientSubComplaintCreated) VALUES (@ClientSubComplaintCreated) "; Once the INSERT is successful I need the auto…
DevilCode
  • 1,054
  • 3
  • 35
  • 61
5
votes
1 answer

Sql Server Compact Edition concurrency / thread safety (i.e. not thread safe)

Over the last few months I have been developing an application using Entity Framework code first and sql server CE for the first time. I have found the combination of the 2 very useful, and compared to my old way of doing things (particularly…
jcvandan
  • 14,124
  • 18
  • 66
  • 103
5
votes
4 answers

C# program is looking for sql server compact 3.5, but I'm using 4.0

Okay, this one is really puzzling me, and I apologize if the title of the question doesn't accurately describe what my problem is. I have a program made in C#, using Entity Framework and SQL Server CE. I developed it on Windows 7, and it works fine.…
Steven Jeffries
  • 3,522
  • 2
  • 20
  • 35
5
votes
2 answers

SQL Server Compact Edition 4 - AccessViolationException

I'm building a .NET 4 WPF application using Entity Framework code first and SQL Server Compact 4.0. I'm trying to call DbContext.SaveChanges() on a background thread to avoid blocking the UI, but I'm occasionally getting the following…
4
votes
3 answers

Should I use Lucene.Net for full text search with SQL Compact Edition 4, or is there a better option?

I'm trying to create a full text search facility for a small blog which is running against a SQL Compact Edition 4 database. There seems to be almost no information out there about this (though I'd be happy if someone can prove me wrong), but as…
Mark Bell
  • 28,985
  • 26
  • 118
  • 145
4
votes
1 answer

Windows Phone 7 Mango - Local Database - SQL CE 4.0

I did not use SQL CE 3.5 for Windows Mobile as I need to include some binaries of SQL CE 3.5 (having size of > 3 MB) in my application setup. Now, I am developing for Windows Phone 7. With Mango realease, we have support for Local Database. Do we…
Let me Ask
  • 1,029
  • 1
  • 8
  • 33
1
2
3
16 17