sql-server-ce

How migrate or transfer SQL Server 2008 Compact Edition Database To Express Edition

I have created database in SQL Server 2008 Compact Edition and now I want to migrate that database in SQL Server 2008 Express Edition. How can I achieve this? Please suggest me the necessary steps. As now, this is my project requirement. ...

In-Memory SQL-CE

Is there a way to connect to a SQL-CE database as a stream? Specifically, our ASP.Net application builds small SDF at runtime for off-line needs. When the user is done with his off-line duties, he uploads the SDF and the application imports the new and updated data. No problems there. Currently, we're saving the uploaded SDF to the w...

NHibernate, WCF & SqlServerCE - Exception thrown loading driver

Background I have a BLL DLL that uses NHibernate. I share the same BLL between a client application and the WCF service (even though the client runs on another machine). I can successfully use either SqlServerCe or SqlServer driver with the BLL with the client application but can only use the SqlServer driver for the WCF. If I change...

problem with date in sql CE

i have sqlCE DataBase, i have Tdate field (datetime) i notice that his format is: MM/DD/YYYY in my C# program i work with date in: DD/MM/YYYY format. how i can insert to my sqlCE data base my C# format ? ...

sqlce in Xenocode

I'm using Xenocode in my application so that it works without a .NET framework. I'm using Xenocode Virtual Application Studio(version 6.1). Everything works fine except the .sdf file which I have embedded inside the application directory. actually in the application the instead of SQL server i have used SQL Compact edition(3.5) and i hav...

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 importing data into CE cannot be such a hassle, or can it ? UPDATE2 : I don't seem to...

How do I rename a table in SQL Server Compact Edition?

I've designed my SQL CE tables using the built-in designer in VS2008. I chose the wrong names for a couple. I am now completely stuck trying to find a way to rename them. I am refusing to believe that such a feature could have been "forgotten". How do I rename an existing table using the VS2008 designer, or a free stand-alone app? ...

Nested Sets: How to query number of relations in many-to-many relationship

With a data structure like this: Tags {id, lft, rgt, depth, parentid} ObjectTags {id, tag_id, object_id} Objects {id} (the entries in Tags are organized as nested sets) I need a result that contains the Tag.id and the number of relationships that this Tag holds, including the relations of it's children but without duplicates. Exampl...

Bulk Insert In SQLCE

Hi, i am new at SQLCE and using Visual Studio 2008,SQLCE 3,5.I want to know that what the best way of inserting bulk records into sqlce database?Does BULK INSERT statement work for SQLCE?I have near 45 tables and some of these tables should have large amount of data.Using command.Prepare is enough or is there more efficent and fast way?...

Cache data in SQL CE database

Background I have an SQL CE database, that is constantly updated (every second). I have a (web) application that allows a user to look at the data in real-time. At some point a user can click "take a snapshot" button, and it will open the snapshot in a different window. And then on that form, there is "print" and "download" buttons that...

[LINQ-to-SQL] Does SQL Server Compact (CE) support a RequiresNew transaction scope inside another one?

Here's a very simple example using SQL Server CE 3.5 SP1 where I attempt to use a new transaction inside an existing one. using (var db = new MyDataContext(<connection string>)) using (var ts = new TransactionScope()) { db.Thing.InsertOnSubmit(new Thing()); db.SubmitChanges(); using (var ts2 = new TransactionScope(Transactio...

SQL Server Compact Edition - Multiple Subscription issues

I have a SQL server 2008 database successfully replicating to a Windows mobile database on a filter subscription. This works great. However If my 2008 database goes down my mobile will not replicate anymore. What i want to do is have a fail over SQL server which if subscription 1 fails to sync then i can call the second subscription on ...

Advice about insert into SQLCE

i am inserting about 1943 records by these function into SQLCE.This is my insert function.Parameters come from StringReader(string comes from webservice).This function executes 1943 times and takes about 20 seconds.I dropped table's indexes,what can i do to improve it?I create just 1 time mycomm and sqlceresultset. Public Function Inser...

Sql Server CE 3.5 and .NET Compact Framework 2.0 SP2

Hello! Can I use Sql Server CE 3.5 with .NET Compact Framework 2.0 SP2? Visual Studio 2008 SP1 only supports this version of SQLServer CE, isn't it? Thank you ...

How to subselect in where statement in SQL Server CE?

Hi, i have the following select statement to get the last login from the user table. this works very well under sqlite, now im porting the database and have Compact Edition from Microsoft. SELECT LOGIN FROM USERS WHERE LASTLOGIN = (SELECT MAX(LASTLOGIN) FROM USERS) The lastlogin column is datetime. This doesn't seems to work, w...

Sql Server CE version installed on Windows Mobile 6 Rom

Hello! Which is the version of SQL Server CE installed on Windows Mobile 6? I think is SQL Server 2005 Mobile Versión 3.0. If I use a database of this version (3.0), will it work on version 3.1 and 3.5? Thank you! ...

SQL Server CE "module could not be found" Crash

We are getting following error message in one Windows XP - X86 Exception Source: System.Data.SqlServerCe Exception Type: System.DllNotFoundException Exception Message: Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Exception Target Site: DllAddRef SQL S...

SQL Server Compact Edition with Entity Framework

I try to use SQL Server Compact Edition with Entity Framework in Visual Studio 2008 SP1. Here's what I do: 1) I create a new project, of type Console Application. 2) I right-click on the project, select Add->New Item. 3) I choose to add a Local Database called Something.sdf 4) In the next page of the "Add New Item" wizard, I choose t...

CHECK/NOCHECK for Sql Compact Edition

I am attempting to wipe and repopulate test data on SQL CE. I am getting an error due to FK constraints existing. Typically in Sql2005 I would ALTER TABLE [tablename] CHECK/NOCHECK CONSTRAINT ALL to enable/disable all constraints. From what I could find in my searching, it seems that this might not be supported in CE. Is that true? ...

Deploy SqlCe with my Windows Mobile app

I've written a Windows Mobile Standard/Smartphone app (my first) that uses a SQL Server Compact Edition database as the backend. I had no problem testing in the emulator in Visual Studio as it installed SqlCe to the emulator for me. When I created my deployment project, though, the resulting CAB file installed on my phone fine, but wou...