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

Slow Query Performance

I am running some very large databases (500 MB and 300 MB) in my application on several different machines. From a hardware perspective, the machines have been identically configured. I am using SQL Server CE 4.0 as my DBMS. The performance critical…
rohitsan
  • 1,001
  • 8
  • 31
1
vote
1 answer

SQL Server CE 4.0 - Counting frequency of distinct values in multiple columns

I have a table with 20 columns and each row can have a value of 0-4 (integer) in each column. I would like to count the number of 0's, the number of 1's, the number of 2's etc in each column for a given subset of the table which is specified in the…
1
vote
0 answers

Entity Framework auto generate database to SQL Server Compact

I am using VS 2012 and the model first approach in Entity Framework 6 to generate a database in SQL Server Compact 4.0. I have installed the Entity Framework package from NuGet and have added EntityFramework.SqlServer.Compact to my references. Once…
mrsargent
  • 2,267
  • 3
  • 19
  • 36
1
vote
1 answer

How to connect Delphi to SQL Server CE 4.0?

Installed 64-bit version of the SQL Server CE 4.0. By using SQL Server Management Studio has created a .sdf file of database. How to connect from Delphi XE to that database?
HeathRow
  • 117
  • 1
  • 8
1
vote
1 answer

Check if a result set has specific values

I want to know what is the best way to check if a subquery has a set of values. I came up with the following query but I don't think its efficient. SELECT * FROM SomeTable WHERE ( 2 IN (SELECT OptionId FROM Table2 WHERE Table2_Id = 1) AND …
mrtaikandi
  • 6,753
  • 16
  • 62
  • 93
1
vote
0 answers

how do I set the data location with SqlServerCE without naming the sdf?

I'm using Sql Server Compact Edition v4 with EntityFramework v5. I pass the name of the sdf file into the constructor of my various DbContext inheritors. It works fine but always creates the files in ./App_Data. On my deployed server I want it to…
1
vote
2 answers

SQL Server CE Toolbox - VS 2010 plugin not allowing connections to 4.0

I've installed the SQL Server Compact Edition 4.0 runtime and DbFactory provider and everything. But after I've installed the SQL Server CE Toolbox (v3.2) from CodePlex, I still cannot seem to get any connections established. The info dialog seems…
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
1
vote
3 answers

How to solve false "EF Power Tools: modelEntityContainerName contains characters that are not valid"?

I'm facing an issue that many already faced, with a difference: neither the SDF file name, or the path, contains invalid characters. I've even tried with the Northwind.sdf file and Ikeep getting the same issue. And example of a full path:…
1
vote
1 answer

SQL CE 4 Error: The ntext and image data types cannot be used in WHERE, HAVING, GROUP BY, ON, or IN clauses

I'm trying to migrate an old SQL Server database (created in Entity Framework 4) to SQL CE 4. I've moved everything, recreated the schema and inserted the data into the SDF file, but now when I try to launch my site, I'm getting this error: The…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
1
vote
0 answers

How to make a setup for Visual Studio 2012 project which uses SQL Server CE 4.0 and .net framework 4.0 or 3.5 sp1 with GAC registering?

I have created a Windows forms application project in VS 2012 which uses SQL Server CE 4.0 (Compact Edition) and .NET framework 3.5 sp1 and in future 4.0! Now I don't know how to create a setup! Because no setup project is supported in VS 2012…
1
vote
1 answer

SQL Server Compact 4.0 DateTime precision does not include seconds

According to this link http://msdn.microsoft.com/en-us/library/ms172424.aspx SQL Server Compact Edition 4.0 supports DateTime with the usual SQL Server precision (seconds and milliseconds to 3.33). However I'm creating records using the SQL Server…
GrahamB
  • 1,368
  • 15
  • 35
1
vote
1 answer

Exception connecting to SQL Server CE 4.0

When trying connecting to SQL Server CE 4.0 (SqlServerCe.dll, v2.0.50727), I get an exception (System.Data.Common.DbException) saying: The CRT binary present in application/bin folder is not signed and can be a potential security risk. Please place…
Markus
  • 19
  • 3
1
vote
2 answers

SQL Server CE identifies a cyclical reference with Entity Framework Code First but SQL Server 2008 does not

I am working on an Entity Framework Code First project that has a fairly complex Data Model which deploys absolutely fine on SQL Server 2008. However when creating an SQL Server CE database for some local End-To-End testing I get the following error…
glenatron
  • 11,018
  • 13
  • 64
  • 112
1
vote
1 answer

How to view SQL Server CE system tables in Visual Studio 2012

I can open a SQL Server CE 4.0 .sdf file in Visual Studio 2012 and it appears in the Server Explorer. All good. But as far as I can tell it only shows the regular tables, not system tables. Is there a way to show system tables?
Jack Ukleja
  • 13,061
  • 11
  • 72
  • 113
1
vote
1 answer

Override Property Mapping with Fluent NHibernate

I have a Fluent NHibernate Mapping that maps a property of a class to use the NHibernate XDocType Map(x => x.Content) .Not.Nullable() .CustomType(typeof (XDocType)); I'm using this as the table column in Sql 2008 db is of…
Grant Trevor
  • 1,052
  • 9
  • 23