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

nvarchar or varchar or date in joins of SQL Server

I have a management project developed in Web using SQL Server 2008 R2 and Windows Application using SQL Server CE 4.0. Both uses almost same database structure. I have a fees table as : TABLE [fees] ( [feeid] bigint NOT NULL IDENTITY(1,1), …
Admin
  • 173
  • 3
  • 16
1
vote
1 answer

Trying to a Simple Transaction with EF CTP5 & SqlServerCE4.0 == failed. Why?

I've got some code which is throwing an exception when I use this against SqlServer CE 4.0 & within a TransactionScope. First, the code, then the error. // Arrange. // ... some stuff ... // like .. order = get order with ID #1. // Act. using (new…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
1
vote
0 answers

Could not determine storage version a valid storage connection or a version hint is required

Main exception --> provider did not return a provider manifest instance I am using entity framework code first and Sql ce 4.0 please find the below stack trace at System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifest(String…
1
vote
1 answer

SQLMetal incompatible database error with SQL Server CE

I have created a simple SQL Server Compact database in my C# project. When I try to use SQLmetal with my database1.sdf file to create a code file, I am getting the following error message Error : Incompatible Database Version. If this was a…
1
vote
4 answers

How can I query a dataset based on double columns being "close to" some value?

I have a reference database that holds coordinates of objects on the celestial grid. I want to query the database and find objects that are "close to" (within a certain angular distance of) a given point. I've tried this query: const double…
Tim Long
  • 13,508
  • 19
  • 79
  • 147
1
vote
0 answers

How can I use EF6 and a SQL Server CE database when I have no access to App.config?

I am having an issue with code-based configuration of Entity Framework 6 and SQL Server CE 4.0. My project is a COM component class library that must work with multiple applications and I cannot know ahead of time which applications will consume the…
Tim Long
  • 13,508
  • 19
  • 79
  • 147
1
vote
1 answer

Error Begin Transcation Into SQL Server Compact Edition

I want to begin a transaction in SQL Server CE 4.0 using the following code and also rollback that transaction. Same query works fine in SQL Server 2008 but not in SQL Server CE 4.0, so please help me to solve this: BEGIN TRAN d SELECT COUNT(*)…
KARAN
  • 1,023
  • 1
  • 12
  • 24
1
vote
1 answer

Use one DataContext.ExecuteCommand to execute query for multiple tables

I need to delete all data from my tables in database. So I use DataContext.ExecuteCommand. db.ExecuteCommand("DELETE From Products"); This method causes a new request to the database for each table. I want to clear data from my tables in one query.…
demo
  • 6,038
  • 19
  • 75
  • 149
1
vote
1 answer

SQL Server Compact 4.0 image column truncated to 8000

I am working with SQL Compact 4.0 for the first time and trying to insert data into an IMAGE column and most of the data is around 50kbytes. The problem I am getting is although the image column is supposed to be big enough the data is being…
1
vote
0 answers

SQL CE 4.0 Datatypes and SQL server 2012 datatypes mapping

Can someone please help us in establishing mapping of SQL CE 4.0 Data Types and SQL server 2012 Though we found following SQL CE and SQL Server 2000 (here.) .NET and SQL 2012(here.) OLEDB and SQL CE SQL Server CE Data Type Mapping from ADOX
Sawarkar vikas
  • 315
  • 1
  • 5
  • 9
1
vote
2 answers

Create SQL Server Compact 3.5 from .net 4.5

I have a C# application compiled on net 4.5. I need to create a SQL Server CE 3.5 database file because it will be used on a Windows CE 6 device. When I create a database from code using SqlCeEngine en = new…
1
vote
1 answer

NOT LIKE search on Link Table

I have a Model table with an ID and A Text Column: ID | Description ======================= 1 | Model A 2 | Model B 3 | Model C I have an Items table with an ID and lots of other columns. These two tables are linked…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51
1
vote
0 answers

WPF / local SQL Server CE 4.0 / Underling provider failed on open

I have WPF application that is using EF6 with local SQL Server Compact Edition 4.0 database. I’m using private deployment for SQL Server Compact Edition. Application works without any errors on 99% of the workstations but I’m encountering a problem…
macfly
  • 255
  • 3
  • 13
1
vote
0 answers

SQL Server CE - The column name is not valid

I've been racking my brain trying to figure out what this error means and how to fix it: The column name is not valid. [ Node name (if any) = ,Column name = id ] Here is the db schema: Staff: Id: int, not null, auto increment by 1, primary…
1
vote
1 answer

SQL Server Ce 4.0 Error 2700

I have a C# application intended to migrate data from MS Access to SQL Server Compact 4.0 There is a large amount of data and as such I am utilizing a large number of Parallel.Foreach statements to go through the data and there are a large number of…
Steven Wood
  • 2,675
  • 3
  • 26
  • 51