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
2
votes
3 answers

Using SQL Server Ce 4.0 with log4net

I'm trying to use SQL Server Compact Edition (v4.0) with log4net. There's a great guide here. It uses Compact Edition 3.5, but most of the steps should be the same. So, I've created a SQL Server CE 4.0 database inside "App_Data" with a "Log" table…
Matt Roberts
  • 26,371
  • 31
  • 103
  • 180
2
votes
1 answer

Heavy Duty use of SQL Compact with WebMatrix

I've been told not to use SQL Server Compact that comes with WebMatrix for any heavy duty stuff. But, just exactly how heavy is "heavy duty"? If I have a couple thousand products in a SQL Server Compact DB, plus a couple tables for registration and…
βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33
2
votes
1 answer

What can I do to generate the DB in EF Code First?

I am not planning to use EF Code First in an MVC Website. I am looking to Utilize it in a App that has a WPF Client. Projects are setup as ContactManager.Core // Contains all Entities(dll) ContactManager.Data // Contains the DataContext and…
Perpetualcoder
  • 13,501
  • 9
  • 64
  • 99
2
votes
2 answers

Is it possible to use the same Entity Framework model for both SQL Express & SQL CE 4.0?

I'm currently working on a SOA project where at some locations it would make sense for the service to use a lightweight database (SQL CE 4.0) while at other locations a more robust database is desirable (SQL Express right now, but possibly scaling…
2
votes
1 answer

Unable to use Orchard ContentPart with ntext column

I have a table created in the sql ce database for my content part "CourseDescription". The "Syllabus" column uses ntext as it's type. However, when I try to create a CourseDescription I get the following exception: [InvalidOperationException: @p1 :…
Sean Cain
  • 898
  • 2
  • 10
  • 16
2
votes
1 answer

SQL Compact 4.0 and Entity Framework 4.0: Image/Blob limits?

A while back, I tried using SQL Compact 3.5 SP1 with Entity Framework 4.0. One of the problems I ran into was a size restriction on image/blob objects (something like 8K) that made the type pretty useless. Does anyone know if this problem has been…
2
votes
2 answers

ASP.Net membership for sql server compact database for ASP.Net MVC 3 project

When we start ASP.Net MVC 3 Starter Site Project in WebMatrix. We get asp.net membership tables pre-installed in SDF (SQL Compact) db. Now, if we want to create them in new SQL CE 4.0 DB, what is the procedure? i dont want to use starter site.
2
votes
3 answers

Getting "Access to database file is not allowed" error when creating a build for 64-bit windows machines

I am creating a new version of an existing Windows desktop application that has been working well for several years. The application uses a SqlServerCe database, which is installed to the DataDirectory of the machine. The new version of the…
rogdawg
  • 687
  • 3
  • 11
  • 33
2
votes
2 answers

Simple condition break down query optimizer and its performance

I have a simple query: select top 10 * FROM Revision2UploadLocations r2l inner join Revisions r on r2l.RevisionId = r.Id INNER JOIN [Databases] [D] on [R].[DatabaseId] = [D].[Id] INNER JOIN [SqlServers] [S] on [D].[InstanceId] = [S].[Id] where…
Yuriy Gavrishov
  • 4,341
  • 2
  • 17
  • 29
2
votes
0 answers

The underlying provider failed on Open. SQL Compact Edition 4 and EntityFrameWork 6, WindowsForm Application Deployment

I hope I will get my answer soon from experts here. Here is my problem: The underlying provider failed on Open. EntityFramework at System.Data.Entity.Core.EntityClient.EntityConnection.Open() at…
Khaksar
  • 333
  • 3
  • 17
2
votes
1 answer

IDENTITY_INSERT and SQL Server Compact

The script below creates a table, temporarily turns off auto identity, inserts records whilst specifying the PK value, then re-enables auto identity. DROP TABLE Foo; GO CREATE TABLE Foo (Id int IDENTITY (1,1) NOT NULL, Bar…
h bob
  • 3,610
  • 3
  • 35
  • 51
2
votes
2 answers

Creating an instance of SqlCeLockTimeoutException

For unit testing purposes, I want to create a mock object of type SqlCeLockTimeoutException Since its constructor is protected, I created an extending class in my test: [Serializable] private class TestableSqlCeLockTimeoutException :…
Mugen
  • 8,301
  • 10
  • 62
  • 140
2
votes
1 answer

Entity Framework 6.1.3 and SQL Server CE 4.0 - No Entity Framework provider found

PROBLEM: I had a website that was working with my local dev machine (VS2013, EF6.1.3, SQl Server CE 4.0, EF Tools installed). I maintain the website using a git repo locally and in VS OnLine. I am at a different (temporary) location with a new…
RRRSR
  • 293
  • 1
  • 3
  • 12
2
votes
1 answer

Entity Framework looks for ADO.NET provider SqlServerCe.3.5 instead of 4.0

I am using SQL Server CE 4.0 along with entity framework 6.0. Everythings work fine until I wanted to enable a N-Tier syncing mechanism with a remote database using a WCF service and the Sync Framework 2.1. I followed this tutorial and use the…
2
votes
2 answers

Indexes on a Read Only Database

Im not sure whether this is the place for this question but here goes: I have a read-only database, it contains many tables which are accessed and searched using c# desktop application. I am looking at indexes and most of the tutorials and…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51