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

Not Like Operator Weird Result Count

I have a table with 31,483 records in it. I would like to search this table using both a LIKE and a NOT LIKE operator. The user can select the Contains or the Does Not Contain option. When I do a LIKE the where clause is as follows WHERE Model LIKE…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
2
votes
0 answers

What technology is Microsoft recommending to replace Microsoft Sync Framework?

I have an project where I want to scan data to a table using a handheld device. The device would be docked sending the batch of data to the PC to be processed using ActiveSync or Windows Mobile Device Center. The device in this case runs Windows CE…
2
votes
1 answer

How to use Code-first to connect to existing SQL Server CE database?

I want to try using code first to connect to an existing SQL Server Compact Edition database, as described here. The tutorial however shows how to connect to a SQL Server or LocalDb. The main problem is that I cannot add SQL Server Compact data…
Gio2k
  • 384
  • 3
  • 13
2
votes
1 answer

Can't use sql server ce 4.0 in asp.net in visual studio 2012

At first it wrote this exception: "SQL Server Compact is not intended for ASP.NET development." and then I added: AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true); to the Global.aspx and it fixed it. But now when…
2
votes
3 answers

Comparing C# datetime value to SQL Server Compact 4 datetime

I'm building an application that stores a group of datetimes to keep track of when I print a particular report. The report is built up of information from a second table that also has datetimes. I'm trying to get the report to populate a…
Josh C.
  • 389
  • 1
  • 5
  • 17
2
votes
2 answers

SQL Server Compact 4.0 does not work in VS 2010 SP1

I've installed SQL Server compact 4.0 local database and I've added a database. However, if I try to open my database, an unknown errors occurs. I tried to restart my VS 2010 after install the SQL Server, but it does not help and I cannot open my…
StepUp
  • 36,391
  • 15
  • 88
  • 148
2
votes
1 answer

How to combine Entity Framework and SQL Compact in Visual Studio 2012?

I am using the MS Entity Framework and Visual Studio 2012 in combination with the SQL Server Express. Now I want to use the EF in combination with an SQL Server Compact Edition database. The design process will be model first. I created an SQL CE…
2
votes
1 answer

For a small Database site, should i choose SQL CE or SQL Server

I have a website with not more than 100 products which shall grow to 1000-5000 over the period of time if the website grows. I like SQL CE as its hassle free in deployment and backup. The only thing i am afraid is the performance i will receive from…
2
votes
1 answer

ReportViewer in 2012 won't bind to SQL Server Compact datasource

I am using Visual Studio 2012 and SQL Server Compact 4.0. When I try to bind the ReportViewer control to an instance of a datasource via the designer, it won't bind (the selectable instance is disabled) The error message is : An error occurred…
Greg
  • 2,654
  • 3
  • 36
  • 59
2
votes
2 answers

Allow Entity Framework 4.5 to use datetime2 with SQL Server CE4

I am working on an Entity Framework project using SQL Server 2008. We recently changed to use the datetime2 field type for a lot of our Dates as we need the precision. This works fine against our live and development databases, but as part of our…
glenatron
  • 11,018
  • 13
  • 64
  • 112
2
votes
1 answer

Image data type in SQL Server Comapct 4 & Code-First Entity Framewwork 5

My Code-First entity column is declared like this: [Required, DataType("image")] public byte[] Picture { get; set; } Validations are turned off: Configuration.ValidateOnSaveEnabled = false; And is column type is still varbinary(4000). When I try…
2
votes
2 answers

Can SSIS output an SQL Server Compact 4.0 file?

I am using SSIS 2008 to read data from my database. Now I would like it to save that data in an SQL Server Compact 4.0 file (which will be read by the ASP.net MVC 3 app) Has anyone else done this? Like I said this is for a SQL CE 4.0, not 3.5
Joe
  • 286
  • 1
  • 2
  • 13
1
vote
1 answer

How to integrate SQL Server CE with Enterprise Library 5 DatabaseFactory?

I'm getting an "Activation error occured while trying to get instance of type Database, key "" " exception with my DatabaseFactory.CreateDatabase() whenever I reference the default database to a SQL Server CE I tried checking if the problem is…
Martin Ongtangco
  • 22,657
  • 16
  • 58
  • 84
1
vote
1 answer

SQL Server CE 4 - how to select n random rows from a table?

Does anyone have a query that will select n number of random rows from a SQL Server CE 4 table?
ipr101
  • 24,096
  • 8
  • 59
  • 61
1
vote
1 answer

working with sqlce and ErikEJ.SqlCe library

i got this errors Error 1 The type 'System.Data.SqlServerCe.SqlCeTransaction' is defined in an assembly is not referenced That. You Must add a reference to assembly 'System.Data.SqlServerCe, Version = 4.0.0.0, Culture = neutral, PublicKeyToken =…
angel uc
  • 279
  • 2
  • 8
  • 21