Questions tagged [sql-server-ce]

3695 questions
215
votes
2 answers

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

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.…
Ricardo Altamirano
  • 14,650
  • 21
  • 72
  • 105
151
votes
3 answers

How do you open an SDF file (SQL Server Compact Edition)?

I have an SDF file and I would like to retrieve its schema and query it with some UI. How can I do this? I have no Visual Studio installed on the machine and I would like to install as little software as possible.
agsamek
  • 8,734
  • 11
  • 36
  • 43
64
votes
5 answers

How to convert DateTime of type DateTimeKind.Unspecified to DateTime.Kind.Utc in C# (.NET)

I've inherited C# code that has an awful lot of DateTimes where the Kind property is DateTimeKind.Unspecified. These are fed into Datetime.ToUniversalTime() which gives back a UTC datetime (it adds 7 hours in my case). This is how ToUniversalTime()…
Dave
  • 8,095
  • 14
  • 56
  • 99
55
votes
9 answers

What are the limitations to SQL Server Compact? (Or - how does one choose a database to use on MS platforms?)

The application I want to build using MS Visual C# Express (I'm willing to upgrade to Standard if that becomes required) that needs a database. I was all psyched about the SQL Server Compact - because I don't want the folks who would be installing…
adeena
  • 4,027
  • 15
  • 40
  • 52
55
votes
7 answers

Is SQL Server Compact discontinued from Visual Studio 2013?

when I tried to create a new SQL Server Compact file from Visual Studio -> Add New Item, I don't see the 'Local Database' option any more which was actually the way to add SQL Server Compact Database. Now, if it is really discontinued from…
Emran Hussain
  • 11,551
  • 5
  • 41
  • 48
53
votes
12 answers

How do I specify that a property should generate a TEXT column rather than an nvarchar(4000)

I'm working with the Code First feature of Entity Framework and I'm trying to figure out how I can specify the column data types that should be created when the database is auto-generated. I have a simple model: public class Article { public int…
Mark Bell
  • 28,985
  • 26
  • 118
  • 145
53
votes
1 answer

SQL Server Compact 4.0 vs. SQLite

I'm interested in choosing an embedded DB engine for my WPF app. I would like information on how SQLite and latest SQL CE 4.0 compare. And if I should choose one over the other. Points of interest would be ORM support with EF4's CTP & NHibernate…
AVP06
  • 1,079
  • 1
  • 10
  • 16
52
votes
6 answers

how to open *.sdf files?

I used to open sdf (sqlCE) files with visual-studio? or sql-server? I really don't remember. Now I can't open this sdf file. With what program do I need to open it?
Gold
  • 60,526
  • 100
  • 215
  • 315
52
votes
1 answer

Is Microsoft dropping support for SDF database files in Visual Studio?

In Visual Studio 2013 there is no longer an option to create .sdf SQL Server Compact databases in WebPages (WebMatrix) websites. I am no longer able to view .sdf database files in Visual Studio either. I downloaded the latest version of WebMatrix to…
jAsOn
  • 927
  • 2
  • 7
  • 16
52
votes
2 answers

Create SQL Server CE database file programmatically

How can I create a new SQL Server Compact database file (.sdf) programmatically, without having an existing template file to copy from?
Andrew Arnott
  • 80,040
  • 26
  • 132
  • 171
51
votes
15 answers

How to identify whether the table has identity column

I want to find out whether the table has an identity column or not. Table is unknown to me. I have not done the structure of the table. Using Query? I am using Sql Server Compact Edition.
Shiny
  • 1,053
  • 3
  • 13
  • 19
50
votes
10 answers

Connection string with relative path to the database file

I load data from sdf database in winforms App. I use full path to the database file . Example : conn = new SqlCeConnection { ConnectionString ="Data Source=F:\\My Documents\\Project1\\bin\\Debug\\Database.sdf" }; I d like use a relative path…
Martin
  • 501
  • 1
  • 4
  • 4
48
votes
7 answers

How do you create a foreign key relationship in a SQL Server CE (Compact Edition) Database?

Visual Studio 2005 doesn't provide an interface for creating relationships between tables in a SQL Server CE database (I'm using version 3.0) and you can't open a Compact Edition DB using Management Studio as far as I know. Any ideas?
Ryan Shripat
  • 5,574
  • 6
  • 49
  • 77
47
votes
3 answers

How to deploy SQL Server Compact Edition 4.0?

How do i deploy Microsoft SQL Server Compact 4.0? SQL Server Compact Edition (currently at version 4.0) is: a free, embedded database that software developers can use for building Windows desktop applications. It has a small footprint and supports…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
37
votes
4 answers

SQL Server CE 4.0 performance comparison

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)…
MajesticRa
  • 13,770
  • 12
  • 63
  • 77
1
2 3
99 100