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
0
votes
0 answers

Why can't I open a SQL Server CE database read-only when the SDF file has permissions that allow read-only?

I'm trying to open a .SDF file using SQL Server CE 4.0 SP1. The .SDF file lives in C:\Program Files (x86). The permissions are set up so that normal users have read & execute permissions on the file. The client program is running as a regular user…
Ken Kauer
  • 21
  • 3
0
votes
2 answers

Sql server CE 4.0 in a Visual studio project suddenly losing data

I am not sure if this is a setup issue from my side or some bug, but I am facing a really wierd problem. I am developing against SQL Server CE 4.0 in a VS 2010 Winforms Project. It is kept in the project like so Now what happens is, for some…
Roopesh Shenoy
  • 3,389
  • 1
  • 33
  • 50
0
votes
1 answer

MVC 3, MVCScaffolding. Using SQLCe instead of Express. No database file created

I've been using the new MVCScaffolding for my next CMS and it's been awesome so far. Awesome until I wanted to change my SQLExpress default database to a SQLCe local database. Here (…
Tommy B.
  • 3,591
  • 14
  • 61
  • 105
0
votes
2 answers

Can I use SQL CE 4.0 in Windows Mobile 6.5?

The title is the question by its own! Can I program using SQL CE 4.0 for the Windows Mobile devices? Is there any runtime that I must install to develop software on the CE 4? or it just can play using the ADO.NET API? Thank you.
George Taskos
  • 8,324
  • 18
  • 82
  • 147
0
votes
1 answer

How To Add MVC3 SqlMembershipProvider With SQLCE4

I'm not quite sure if this has been asked or discussed elsewhere but I'm trying to implement the SqlMembershipProvider but I also want to use SQLCE4. I feel that having to have not only two databases but having two separate "server" systems drive…
clockwiseq
  • 4,189
  • 9
  • 38
  • 61
0
votes
0 answers

SQL Server CE Persistence issue on a single PC

I have a small application running on several PCs for over a couple of years now, with a SQL Server CE 4 database file in a shared location. It's been working for a long time without issues, but now, and on a single PC, there are persistence…
537mfb
  • 1,374
  • 1
  • 16
  • 32
0
votes
1 answer

2 sub queries in insert statement values in MS SQL Server Compact Edition 4.0

Specifically I'm using SQL Server Compact 4.0, if that makes a difference. I have 3 tables (note,userTable,verse). the user and verse table have no correlation except in this note table, so I can't do a single subquery joining the two tables. INSERT…
0
votes
1 answer

DropCreateDatabaseAlways in App.config file for EntityFramework 6.0 with Sql Server Ce

I have no idea, where should I set up System.Data.Entity.DropCreateDatabaseAlways parameter in my App.config file. I do understand, that config section named "entityFramework" is defined here. I presume this section should be used. But I can't find…
Marcin
  • 57
  • 7
0
votes
1 answer

Programatically retrieve the full data directory path in VB.NET

I am working on a VB.NET / WPF application which will use SQL Compact Edition databases. The application should allow the user to save and load different versions of the database. To do this, my intention was to have a standard database name (e.g.…
Rooq
  • 81
  • 1
  • 9
0
votes
1 answer

What is the easiest way to compare DateTime in linq with sql server ce?

I have a sql-server-ce 4 database having a table with a DateTime? column named EndDate. When I delete a record I set this enddate and when I want to retrieve a list of records, I want to filter all the deleted records by applying a filter on the…
Cornelis
  • 1,729
  • 5
  • 23
  • 39
0
votes
1 answer

code optimisation : list loop and query c# sql server compact edition

the code here is for checking is there any interaction between added drugs in a dataGridView ( Productgridview ) front end : C# with VS2012 .Net 4.0 back end : sql server compact edition 4.0 the schema for database : table product : productId ;…
PGN 508
  • 11
  • 3
0
votes
1 answer

"Add Linq-to-SQL Datacontext to Current Project" Disabled in SQL Server Compact

I'm trying to create Linq-to-sql DataContext using SQLite/SQL Server Compact Toolbox but I can't seem to drag the tables to the Linq-to-SQL file. So I tried to right click my table in the toolbox and the "Add Linq-to-SQL Datacontext to current…
0
votes
1 answer

Is it possible to disable auto shrink in SQL Server CE using Entity Framework

Is it possible to adjust SQL Server connection parameters using Entity Framework in order to completely disable auto-shrink behaviour with parameter "autoshrink threshold = 100"? SQL Server CE version: 4.0 EntityFramework:…
iljon
  • 398
  • 2
  • 16
0
votes
0 answers

IIS SQL Server Compact 4.0 SP1

I've been using SQL Server Compact Edition 4.0 SP1 with Entity Framework for data access in one of our web applications for the past couple of years without problems, but in the last couple of days I've been getting errors when attempting to run the…
llihp
  • 195
  • 1
  • 2
  • 10
0
votes
1 answer

Entity Framework 6.1.3 and SQL Server CE 4.0 - Code First Setup a password to protect sdf file

I am using Entity Framework 6.1.3 along with SQL Server CE 4.0. Is there anyway to put a password on the generated sdf file the first time it is created?
Frank Liu
  • 1,466
  • 3
  • 23
  • 36