sql-server-ce

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'

青春壹個敷衍的年華 提交于 2019-11-27 21:50:24
I got the following error when I used sqlce 4.0 with entityframework 6.0 No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0' My app.config looks like this .... <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <!-- For more information on

SQL Server CE in a multi user scenario - is this really, really stupid?

匆匆过客 提交于 2019-11-27 21:28:32
I am trying to use SQL Server Compact Edition 3.5 as a database backend for a sales application. There would be 3-4 installations of a Windows Forms application which would all (via LINQ2SQL) read from and write to one .sdf file located on a network share. My (pretty inextensive) testing has shown that this could be viable. Documentation states that SQL Server CE supports up to 256 connections. Does SQL Server CE even lock its rows? Are there other concurrency issues that I should worry about? Bottom line is, has anyone used SQL Server CE successfully with multiple applications connecting to

Do Windows 8 Metro style application support SQL Server CE local database?

百般思念 提交于 2019-11-27 18:30:15
问题 I have built a Windows Phone Application using SQL Server CE database. We need transplant this app to Windows 8 Metro Style. Do Windows 8 Metro-style applications support SQL Server CE local databases? 回答1: As already answered by ErikEJ, there is no native support for a local SQL Server CE database, but maybe this third party component SQLite is usefull for you? Tim Heuer has wrote a blogpost about how to use SQLite in a metro style app: http://timheuer.com/blog/archive/2012/05/20/using

Using SQL Server CE 4 on a remote host with MVC 3

此生再无相见时 提交于 2019-11-27 18:22:14
I just upgraded my host to MVC 3 but I'm trying to do a "hello world" using SQLCE 4.0 but I just got: Sorry, an error occurred while processing your request. I see my layout and everything but instead of data I see that. On localhost is working as expected I have: <add name="PruebaContext" connectionString="Data Source=|DataDirectory|db.sdf" providerName="System.Data.SqlServerCE.4.0"/> as connectionString. I put the sdf as part of the project, I added the System.Data.SqlServerCE.dll to the project with the local copy to true. I have no more ideas. The connString, the dll is in /bin and is

Create SQL Server CE database file programmatically

Deadly 提交于 2019-11-27 17:48:52
How can I create a new SQL Server Compact database file (.sdf) programmatically, without having an existing template file to copy from? There is some good info here: Create a SQL Server Compact Edition Database with C# string connectionString = "DataSource=\"test.sdf\"; Password=\"mypassword\""; SqlCeEngine en = new SqlCeEngine(connectionString); en.CreateDatabase(); aminescm First, go click on the Browse tab. Now navigate to C:\Program Files\Microsoft SQL Server Compact Edition\v3.1 . Now pick the System.Dadta.SqlServerCe.dll , click on it, then click on OK to pull in the reference. Now let’s

Why can't I use an alias in a DELETE statement?

被刻印的时光 ゝ 提交于 2019-11-27 17:33:22
In SQL Server Compact Edition in Visual Studio 2010 (maybe SQL Server and SQL in general, I don't know), this command works: DELETE FROM foods WHERE (name IN ('chickens', 'rabbits')) but this command produces an error of: Error near identifier f. Expecting OUTPUT. DELETE FROM foods f WHERE (f.name IN ('chickens', 'rabbits')) To alias the table you'd have to say: DELETE f FROM dbo.foods AS f WHERE f.name IN (...); I fail to see the point of aliasing for this specific DELETE statement, especially since (at least IIRC) this no longer conforms to strict ANSI. But yes, as comments suggest, it may

SQL Server CE 4.0 performance comparison

独自空忆成欢 提交于 2019-11-27 17:20:38
SQL Server CE 4 (SQL Server Compact Edition 4.0) is not news already (If it is, you could read this article ) But it is very interesting to see SQL Server CE 4 performance comparison to other databases. Especially with: SQLite SQL Server (1) SQL Server Express * maybe Firebird (1) for applications where functionality is comparable. Unfortunately there are not so much links about the subject that google provides right now. Actually I was unable to find any (for proper SQL CE version). If one could find or share such information lets collect it here for future humanity. Alexander Galkin In my

How to do Sql Server CE table update from another table

吃可爱长大的小学妹 提交于 2019-11-27 15:47:59
I have this sql: UPDATE JOBMAKE SET WIP_STATUS='10sched1' WHERE JBT_TYPE IN (SELECT JBT_TYPE FROM JOBVISIT WHERE JVST_ID = 21) AND JOB_NUMBER IN (SELECT JOB_NUMBER FROM JOBVISIT WHERE JVST_ID = 21) It works until I turn it into a parameterised query: UPDATE JOBMAKE SET WIP_STATUS='10sched1' WHERE JBT_TYPE IN (SELECT JBT_TYPE FROM JOBVISIT WHERE JVST_ID = @jvst_id) AND JOB_NUMBER IN (SELECT JOB_NUMBER FROM JOBVISIT WHERE JVST_ID = @jvst_id) Duplicated parameter names are not allowed. [ Parameter name = @jvst_id ] I tried this (which i think would work in SQL SERVER 2005 - although I haven't

EF 5 + SQL Server CE 4: How to specify custom location for database file?

耗尽温柔 提交于 2019-11-27 15:12:28
问题 I am developing a client system that needs a small local database. I want to avoid installation of SQL Server Express and have decided to go with SQL Server 4. I use Entity Framework 5 for data access and have created my custom context. Everything works fine in development where I can use app.config to either set specific file location or dynamic Data Source=|DataDirectory|\MyDatabase.sdf . But on deploy I want the database to be located in the users documents folder: \My Documents

AssertionFailure: “null identifier” - FluentNH + SQLServerCE

半世苍凉 提交于 2019-11-27 14:45:58
问题 The code fails at session.Save(employee); with AssertionFailure "null identifier". What am I doing wrong? using FluentNHibernate.Cfg; using FluentNHibernate.Cfg.Db; using FluentNHibernate.Mapping; using NHibernate; using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; namespace FNHTest { public class Employee { public virtual int Id { get; private set; } public virtual string Name { get; set; } public virtual string Surname { get; set; } } public class EmployeeMap : ClassMap { public