Questions tagged [sql-server-ce]

3695 questions
10
votes
1 answer

A sample configuration for nlog and SQL Server Compact 4.0

I would be grateful if someone could post me a sample nlog.config for using nlog with SQL Server Compact 4.0. I can output to the console and a file OK. I've tried various dbProviders and connectionStrings, but nothing seems to work. Thanks in…
Alan T
  • 3,294
  • 6
  • 27
  • 27
10
votes
3 answers

SQL Server CE 4 DataProvider not available in server explorer

I have installed the sp1 for visual studio 2010 and installed sql server ce 4 runtime. But still not able to create connection to the sql ce database using standart data provider. This is how my Select DataProvider Dialog looks like now. P.S. Does…
v00d00
  • 3,215
  • 3
  • 32
  • 43
10
votes
4 answers

How connect to SQL Server Compact 4.0 in ASP.NET?

I want connect to SQL Server Compact 4.0 in my ASP.NET application. Here is example of code: protected void Page_Load(object sender, EventArgs e) { string connStr = "Data Source=D:\\MyDB.sdf;"; string sqlStr = "select * from tblMyTable"; …
Yara
  • 4,441
  • 6
  • 42
  • 62
10
votes
2 answers

How can I use Sql CE 4 databases for functional tests

Due to the potential differences between Linq-to-Entities (EF4) and Linq-to-Objects, I need to use an actual database to make sure my query classes retrieve data from EF correctly. Sql CE 4 seems to be the perfect tool for this however I have run…
KallDrexx
  • 27,229
  • 33
  • 143
  • 254
10
votes
4 answers

Dynamic UI Generation in C#

I am designing an application for a library. Not a large scale library, but a very small scale library where my primary task is to just keep information about the books. But this library application should be able to adapt to any professional's…
Ranhiru Jude Cooray
  • 19,542
  • 20
  • 83
  • 128
10
votes
1 answer

EF6: Code First Complex Type

I'm having trouble getting entity framework to flatten my domain entity classes with Value Objects (complex type) fields to one table. Everything works if I tell my model builder to ignore my value objects/complex type, but that results in all the…
Joe
  • 1,327
  • 1
  • 10
  • 19
10
votes
5 answers

Entity Framewok Code First "ADO.NET provider not found" with local SQL Server CE DLL's

I am writing a C# application which uses SQL Server CE 4.0 files, which are accessed through the Entity Framework 6.0 via code-first. (The application needs to be able to use local dll's for the SQL Server CE connection i.e. the application needs to…
Tim
  • 1,621
  • 4
  • 19
  • 35
10
votes
1 answer

EF5 generates SQL Server CE constraints with dot in name

I am building a .NET disconnected client-server application that uses Entity Framework 5 (EF5) to generate a SQL Server CE 4.0 database from POCOs. The application allows the user to perform a bulk copy of data from the network SQL Server into the…
Mike Christian
  • 1,526
  • 1
  • 15
  • 27
10
votes
1 answer

Reverse boolean (bit) value in SQL CE select statement

I am trying to write a query that gets table information from a SQL CE database, ready to be put in c#, later to be exported to XML. I need one of the columns to be named 'IDENT' with a boolean value (to represent whether or not it is the identity…
Mike Baxter
  • 6,868
  • 17
  • 67
  • 115
10
votes
3 answers

How to import data in SQL Compact Edition?

I don't seem to find a tool for it, nor an odbc driver. Thanks UPDATE : I'm aware of the sql scripting possibilities. But than again : how to script a sql 2k table? (not just ddl, but data also?) Of course you can write this all by yourself, but…
Peter
  • 47,963
  • 46
  • 132
  • 181
10
votes
3 answers

%APPDATA% in connection string is not substituted for the actual folder?

When using WPF and entity-framework I have an APP.CONFIG that looks like the following:
JSchwartz
  • 2,536
  • 6
  • 32
  • 45
10
votes
1 answer

DivideByZeroException with SQL Server CE 4 when deleting large numbers of rows

I have an application using LINQ-to-SQL with SQL Server CE 4. I know that this isn't officially supported, but we have made it work, with the following exception. On occasion, we get an error with a row in the database when trying to update it. We…
Steve Wranovsky
  • 5,503
  • 4
  • 34
  • 52
9
votes
2 answers

How to get entity change delta in EF?

I need to get the list of changed fields only, the datastore is ssce so no triggers are available Is there any support in EF to get a list or to build a generic component ?
Kumar
  • 10,997
  • 13
  • 84
  • 134
9
votes
1 answer

What is the difference between Shrink and Compact in SQL Server CE?

I have a method that is run periodically to optimise my application's SQL Server Compact Edition (3.5) database. The existing code uses the Shrink() method: SqlCeEngine engine = new SqlCeEngine(dbConnectionString); …
Paul Beesley
  • 767
  • 2
  • 10
  • 22
9
votes
1 answer

SQL Server CE database size issue

I have an application from a company that went out of business. It appears to use the SQL Server CE database. I have searched the system and can't find any .sdf files. It appears that the database has grown too big. Any idea how I can find the DB…
jb.
  • 91
  • 1
  • 2