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
1
vote
3 answers

Complex SQL writing

I have this table: table session( ID number, SessionID VarChar, Date, Filter ) This table contains searches info, like this: ID SessionID Date filter 4 peqq421gaspts3nuulq5mwcq 24/05/2012 13:48 …
Nir
  • 2,497
  • 9
  • 42
  • 71
1
vote
1 answer

SQL Server CE 4 Entity Framework 4.3.1 Code First accent-insensitive and case-insensitive search

I'm using EF 4.3.1 Code First with a SQL Server CE 4 database, it works great it created all the tables and the database with no hassle But now I'm getting this problem I'm querying the database using LINQ using (var db = new PeopleContext()) { …
dalexsoto
  • 3,412
  • 1
  • 27
  • 43
0
votes
0 answers

Change default nolock behavior of SQL Server CE

Is there a way to change the default behavior of selects in SQL Server CE, with nolock in selects, without having to explicitly ask for a lock in the query? I don't want nolock per default, and I don't want to explicitly set with(rowlock).
Daniel
  • 8,133
  • 5
  • 36
  • 51
0
votes
1 answer

Sharing a SQL CE 4 database between projects

I have one solution in VS2010 containing two MVC 3 projects. These are two distinct applications that must act on the same data, so I need my database to be shared between these projects. I would like to use SQL CE 4, but since it is an in-memory,…
Phillippe Santana
  • 2,906
  • 2
  • 28
  • 29
0
votes
1 answer

Asp.Net app using SQL Server CE 4.0 causes sharing exception with multiple clients

I have an ASP.Net 4.0 website which uses SQL Server CE and EF code-first for its data store. When 2 or more users are on the site I intermittently get the following exception about every 5th or 6th time. There is a file sharing violation. A…
John Melville
  • 3,613
  • 28
  • 30
0
votes
1 answer

How to implement IDatabaseInitializer with SQL Server CE 4.0

I'm new to EF Code First. I created a subclass of DbContext and added some DbSets. I made subclass of DropCreateDatabaseAlways and implemented the following in the context, here is what my context looks like: public class Context :…
0
votes
3 answers

Max number of tables (objects) in SQL Server editions (compact, express)

What are the maximum number of tables that you can have in: SQL CE4 SQL 2008 R2 Express Numbers here http://msdn.microsoft.com/en-us/library/ms143432.aspx I guess is for SQL Server 2008, but are they valid for Express and what about SQL CE4? The…
Daniel
  • 8,133
  • 5
  • 36
  • 51
0
votes
2 answers

Set connectionstring Entity Framework

I have built an application that uses SQL Server Compact 4.0 (.sdf) for data. The user should then be able to save and load .sdf files into the application. I've been able to build an method that creates an empty .sdf file. but my App.Config has an…
Objective Coder
  • 557
  • 3
  • 11
  • 23
0
votes
1 answer

Load and save .sdf at runtime

I'm building an C#-application that uses an SQL Server Compact 4.0 database (.sdf) with Entity Framework for data. I want to be able to load/save-files from within this application so that the user can load a different database or backup the…
Objective Coder
  • 557
  • 3
  • 11
  • 23
0
votes
1 answer

Is it not recommended to use SQL Server CE in catalog based websites

I have build a catalog system which use SQL CE as database. After deploying it at hosting provider (GoDaddy.com), the performance was pathetic. Whenever data access is performed it takes a pretty long time to retrieve the products. Many a times, i…
Pankaj Upadhyay
  • 12,966
  • 24
  • 73
  • 104
0
votes
2 answers

DataTable to SQL CE 4 Server

I have a DataTable in C# and would like to send it to my SQL CE 4 server. One thing that makes it a bit more complicated is that when it encounters an duplicate, it should either ignore it and move on to the next row in the DataTable. I've looked…
Skoder
  • 3,983
  • 11
  • 46
  • 73
0
votes
1 answer

SQL Server Compact Edition 4.0 is not working, even though Visual Studio 2010 SP1 is installed?

I already have Visual Studio 2010 SP1 installed. I am using express edition. Also, installed SQL CE 4.0 runtime, which eventually repair what is installed. Now, in my installed program list in control panel, SQL CE 4.0 is showing up. But when I am…
kunjee
  • 2,739
  • 1
  • 23
  • 38
0
votes
1 answer

The website showing Error when opened with WebMatrix

I have developed a website using Asp.Net MVC which uses a SQL CE database in the App_Data. The website when run in Visual Studio, runs fine. But, when i opened it as 'site from folder' in Microsoft WebMatix. It doesn't show anything. In IE it says…
Pankaj Upadhyay
  • 12,966
  • 24
  • 73
  • 104
0
votes
1 answer

Is Entity Framework EDMX file provider specific?

I wan't to use Sql Server 2008 as production environment with provider System.Data.SqlClient and Sql Server compact 4.0 with provider System.Data.SqlServerCe.4.0 for integration testing with SpecFlow. Is it possible to use the same edmx file in…
Marcus
  • 2,470
  • 1
  • 22
  • 29
0
votes
0 answers

How to choose GUID as the primary key in SQL compact?

Hi I create C# windows form project and use "Microsoft® SQL Server® Compact 4.0 SP1" as database. I create my project with entity framework and code first approach. but I get some error. I want use GUID as type of primary key for tables and my code…
sadegh
  • 103
  • 5