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
1 answer

The function 'CreateTime' is not supported by SQL Server Compact

I wanted to change my code-first project to SQL Server Compact 4.0. But I have a problem with following LINQ expression db.Test.OrderBy(t => t.Name) .ThenBy(t => t.DayOfWeek) .ThenBy(t => DbFunctions.CreateTime(t.TimeFrom.Hour,…
Palmi
  • 2,381
  • 5
  • 28
  • 65
0
votes
1 answer

EF DbSet.Find() returns Detached Entity

I have a very simple Entity with just 4 fields: Name, State, City and ID and some Validations. [Table("Places")] public class Place : BindableBase, IDataErrorInfo { private string name; private string city; private Estado state; …
Michel Feinstein
  • 13,416
  • 16
  • 91
  • 173
0
votes
0 answers

Deployment of ASP.NET 4.5 web app w / SQL Server CE 4.0 database to GoDaddy hosting using VS 2013

So far, I have this ASP.NET web form app project, which contains Microsoft SQL Server CE 4.0 (Compact Edition database file) in Visual Studio 2013 community edition. It's configured as follows (showing the most critical points): bin…
0
votes
1 answer

How can I connect to SQL Server CE using web.config

I would like to know how can I connect to a SQL Server Compact Edition database from my web application? Usually I insert the connection string in the code. How can I connect to the database which is situated in App_Data in the web.config…
0
votes
0 answers

SQL Compact 4.0 database doesn't store data?

I've created a SQL Compact Local DB in my app, added a Dataset for the tables that I created, and want to insert data into the table now. When I execute the Insert TableAdapter method it seems to insert the data into the table, because when I Fill…
Jaques
  • 2,215
  • 1
  • 18
  • 35
0
votes
2 answers

Group by with return everything from one group but only the first from others

First things first - I am connecting to an SqlServerCe database using C# in visual studio 2012. I am using Entity framework 6 and Linq to perform this function. So - On to the question. I have a table as follows ItemGroup ( ID INT PRIMARY KEY, …
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
2 answers

Issue with NOT LIKE

I have a table as follows: ItemID BrandID with data as follows (I actually join to another table to get the Brand text but for brevity I have put them into the same table here ItemID Brand 1 Test 1 Test2 1 stuff …
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
0 answers

DataSet Inserts take progressively longer

Similar to this question I am running through a datatable, using the data to fill a new dataset for the purposes of data migration. The migration inserts into a data set then every 5000 records the added rows get saved to the database using EricEJ…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
1 answer

Data inserts take longer for more iterations executed

I have an empty database which will contain a migrated form of an old legacy database. I read in all of the old data into DataTables which works fine. There is one master table which contains links for almost every table, so this is looped through.…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
2 answers

Cant insert into Identity Column when Multithreading

I have a data migration tool which until recently seemed to work really well. I run through a collection of data rows using Parallel.Foreach, calculate some variables to be inserted into a new record of a table and then run an SQL statement to…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
0 answers

How to give the connection string of SQL Compact DB in web.config where DB is outside the application folder?

How to give the connection string of SQL Compact DB in web.config of ASP.NET application where DB is outside the application folder?
Sunil Aher
  • 747
  • 3
  • 14
  • 34
0
votes
0 answers

An Exclude Query with Link tables

I have two tables **Item** ID ... **ShapeItem** ID ItemID ShapeID RegionID (There are other columns and tables but they are not relevant to this question) I can return all items that have a specific shape id in a specific region id successfully…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
1 answer

SQL Server CE Insert into table doesnt seem to increment identity

I have a table defined like this: CREATE TABLE ItemCategory ( ID INT IDENTITY NOT NULL PRIMARY KEY, CategoryID INT NOT NULL, ItemID INT NOT NULL ); This table links to two tables on the two foreign keys. I have this SQL statement INSERT…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
0
votes
1 answer

Cannot config connection string of EF6 in Multi-project solution

I have one solution with 2 project: I add Entity Framework 6 and Sql server compact for both of them via nuget.
Stiger
  • 1,189
  • 2
  • 14
  • 29
0
votes
1 answer

How to determine reason for slow inserts SQL Server Compact Edition 4.0?

I have an application using the Code First model with Entity Framework 6.1 and SQL Server Compact Edition 4. Inserting into a simple table with an ID, 1 DateTime 2 singles, 2 doubles, and 3 Ints is very slow, ranging from 8 to 15 inserts per second…
Mike
  • 1,276
  • 4
  • 16
  • 27