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

UPDATE on two INNER JOINed tables in SQL Server Compact 4

I'm trying to update values between two tables in sql server compact edition 4.0. My sql is like below: UPDATE ei SET ei.EstateID=e.EstateID FROM EstateImages ei INNER JOIN Estates e ON e.TempKey=ei.TempKey Also tried this: UPDATE EstateImages…
HasanG
  • 12,734
  • 29
  • 100
  • 154
3
votes
1 answer

'Default values not supported error' when working with Entity Framework Code First and SQLServer Compact 4.0

I am trying both xunit and TestDriven.Net for testing, for database using SQL CE4. Here is the entity definition: public class Product { private readonly ICollection inventories = new List(); private…
Samina
  • 31
  • 3
3
votes
1 answer

Does SqlCE 4.0 have it's own Connection Provider in Visual Studio 2010?

I'm trying to create a new SqlCE 4.0 sdf database but I'm not sure which connection provider I need to use? I downloaded CE4.0 from Microsoft separately. ... so is there a new provider we're suppose to use? Or do we use the 3.5 provider?
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
3
votes
1 answer

The key cannot be deleted. The key to be deleted is already deleted from an index by another concurrent session

I have an issue where attempting to delete a row from a table generates this error. Error Code: 80004005 Message: The key cannot be deleted. The key to be deleted is already deleted from an index by another concurrent session. Minor Err.:…
fanuc_bob
  • 857
  • 1
  • 7
  • 20
3
votes
1 answer

Single query generated into > 1100 different Queries in Entity Framework

I have an odd problem - I have a table called Item which links to a table called brand via a BrandID key in the Item table. I have a EF Code First model that has the Navigation property as follows in the Items table: public virtual Brand Brand {…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
3
votes
4 answers

The specified argument value for the function is not valid. [ Argument # = 1,Name of function(if known) = isnull ]

I want to select from a table where a column matches a given parameter. If the parameter is null, I want to select all records from the table. The relevant code below is what throws this error. private static string _dbJobCreate = "CREATE TABLE…
Zeb Rawnsley
  • 2,210
  • 1
  • 21
  • 33
3
votes
2 answers

Entity Framework, ASP.NET, and SQL Server CE

With VS 2010 SP1 I created an ASP.NET MVC4 project from the "internet" template. I then created a connection string for SQL Server CE 4.0:
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
3
votes
0 answers

Foreign key tied to autoincrement primary key won't translate negative numbers to the actual values

I'm working on a small application that parses an html file and adds text to two database tables that are related. I'm using MSVC# 11 and SQL CE. I understand why autoincrement identity values are negative in the dataset designer, and when I look at…
int21h
  • 819
  • 7
  • 15
2
votes
3 answers

PetaPoco not returning expected data

I have a BIT data type on one of my columns. I have written a query that does SELECT * FROM TABLE WHERE BITCOLUMN <> @0 It works fine if I pass in 1 or 0 but if I pass in 3 PetaPoco doesn't return the results I expect. Executing the SQL in a query…
Jon
  • 38,814
  • 81
  • 233
  • 382
2
votes
1 answer

What are all the steps to take to get my SQL Server CE to work on my web host machine

Edit: My question comes down to, what are all the steps I need to take to build a web app that uses SQL Server CE in medium trust? I had copied my desktop version into my bin directory before I posted this, but I'm sure there are more steps to take,…
2
votes
1 answer

Could not load System.Data.SqlServerCe.Entity.dll (Yet it's there)

I have a silverlight application. The server app has an SQL Server CE 4 .sdf in App_Data, and an ADO.NET model generated from it. If I try to Add->New Item->Domain Service Class, I get the error: Schema specified is not valid. Errors: …
Tom Gillen
  • 354
  • 4
  • 12
2
votes
2 answers

Sql Server CE 4 Insert Default Values

Using Sql Server CE 4 I have created the follow table. create table abc(id int identity(1,1) primary key) If I try and insert a row to generate a new identity using the following: insert into abc default values I get an error stating there is an…
Schotime
  • 15,707
  • 10
  • 46
  • 75
2
votes
1 answer

Examples of the Massive Micro ORM with SQL Server Compact 4.0

Are there any examples out there using Massive with SQL Server Compact 4.0? I have seen many examples with SQL Express but not with CE. I am having issues with my configuration (connection string / provider) and would like to see some…
Ken Burkhardt
  • 3,528
  • 6
  • 33
  • 45
2
votes
2 answers

EF4 trying to re-create database even though it's already there?

I'm using ASP.NET MVC 3 and have learnt through the MVC Music Store and other sources. I was able to create a database and have it live but the weird thing was about 5 hours after it was live it went down and had the following error and stack…
Tom
  • 1,187
  • 2
  • 12
  • 21
2
votes
1 answer

Is it ok to run SQL CE 4.0 under .net 3.5?

I was wondering if anyone has run SQL CE 4.0 private deployment under a .net 3.5 application without issue. Thanks.
mservidio
  • 12,817
  • 9
  • 58
  • 84