Questions tagged [sql-server-ce]
3695 questions
9
votes
2 answers
SQL CE Max Length
I need to store articles in an application for WP7. I just want to use a database so I can query by unread articles, etc, etc.
I've run into one big problem with SQL CE in Mango-- there seems to be a limit of 4000 characters, and my article is…

Andrew M
- 4,208
- 11
- 42
- 67
9
votes
2 answers
Setup EF4 data source for SQL Compact 4
I've installed visual studio 2010 SP1, EF 4.1, SQL Compact 4.0 with vs tools. Everything is appears ok, except I can't use SQL Compact 4 as a data source for Entity framework through the wizard. The only alternative is SQL Compact 3.5.
Is there a…

Nickz
- 1,880
- 17
- 35
9
votes
7 answers
To close or not to close connection in database
I work with Windows-Mobile and Windows-CE using SqlCE and I dont know what better to do.
To open connection when the program open, run any query's... update...delete database and close the connection after the program close?
Or open connection run…

Gali
- 14,511
- 28
- 80
- 105
9
votes
3 answers
How to deploy SQL CE 4 CTP to shared hosting?
How do I deploy SQL CE 4.0 with EF4 to a shared hosting provider for ASP.NET MVC 2.0?
I've included System.Data.SqlServerCe.dll, and the amd64 + x86 directories in my bin folder, but keep getting a ".net provider not found". I realize it's currently…

Andrew Lewis
- 5,176
- 1
- 26
- 31
9
votes
1 answer
Reseed identity column in SQL Compact
Is it possible to reset the identity column in a compact database? I'm finding lots of answers regarding standard SQL Server, but no definitive answer regarding if it is possible using SQL CE.
Dropping and recreating the table is not ideal in my…

Mike Baxter
- 6,868
- 17
- 67
- 115
9
votes
1 answer
EF Code first cascade delete on foreign key one-to-many
We are working in Entity framework Code first
We have a class video
class Video{
List Images{
get; set;
}
}
our image infoclass contains a path to the image and some other info
class ImageInfo{
String path;
...
}
we…

Alexander Cosman
- 1,117
- 11
- 20
8
votes
2 answers
SQL CE 4.0 as a InstallShield Prerequisite
I'm making my own prq file to perform the SQL CE 4.0 installation with my WPF application installation. The installer keeps failing, and I'm not sure why. It looks like it attempts to run the CE exe, but then a Windows Installer help window comes…

Beanwah
- 1,290
- 2
- 17
- 28
8
votes
4 answers
The column name is not valid. [ Node name (if any) = t0,Column name = version ]
I am facing issue while trying to query SQLCE database in my Windows Phone Mango application.
I get exception when I execute
foreach (var item in myDataContext.MyTable.Select(item => item))
The column name is not valid. [ Node name (if any) =…

Haris Hasan
- 29,856
- 10
- 92
- 122
8
votes
1 answer
Local DB throws Byte array truncation to a length of 8000 exception
I'm trying to take a snapshot from a Map control as a WritableBitmap, convert it to a byte array and save it in the local DB. It works fine (I can convert the byte array back to the image) untill I submit the changes to the DB. At this point it…

Dmitry T
- 93
- 1
- 5
8
votes
2 answers
Are there frameworks available to track user activity?
Before I start writing my own custom classes, I was wondering if there was a framework already out there to use.
This is for a Winform/WPF application. I will be storing things such as battery levels, WiFi strength, hard drive info, RAM info, etc.…

ABR
- 175
- 8
8
votes
3 answers
Inserting a large number of rows into SQL CE 4.0 with Entity Framework 4 (performance issue)
I have a small SQL CE 4.0 database with several tables, mapped using Entity Framework 4.
Here is the code I have
foreach (String designation in newItemDesignations)
{
ParameterData defaultValue = PDM.GetDefaultParameterData(designation);
//…

Kornelije Petak
- 9,412
- 15
- 68
- 96
8
votes
1 answer
How do I get the Entity Framework to initialise collections on my newly-created entities?
I'm trying to seed my database with some test data with an IDatabaseIntialiser like this:
protected override void Seed(BlogDataContext context)
{
//
var post = context.Posts.Create();
post.Title = "My Life On Twitter";
//…

Danny Tuppeny
- 40,147
- 24
- 151
- 275
8
votes
3 answers
How can I connect to a SDF database? No connection string I try seems to work
I've tried literally 50+ different attempts at my connection string for my local database and nothing seems to work. I'm essentially just trying to open a connection the database file so I can dump in the data I've pulled out of my excel…

JoshG
- 911
- 3
- 14
- 20
8
votes
3 answers
Inserting a row and retrieving identity of new row in SQL Server CE
I'm trying to insert a row and get back the new row's identity with something like this:
INSERT INTO blah....;
SELECT @@IDENTITY as NewID;
I'm trying to execute both statements with a single invocation of a DbCommand object in C#... it doesn't seem…

Brad Robinson
- 44,114
- 19
- 59
- 88
8
votes
2 answers
How Convert SQL CE 3.5 database to SQLite
I started a project using SQL CE 3.5 in Visual Studio 10. But now I found out that the database is very slow. I did some testing on SQLite and thi is much faster.
Is there a way that I easily can convert de SQL CE 3.5 (sdf) database to SQLite?

Marcel
- 213
- 1
- 4
- 13