sql-server-ce

What is the best way to represent a timespan in SQL Server CE?

Specifically speaking I only need hours:minutes but say I have a .NET TimeSpan object, how should I store that in a SQL(CE) database? ...

Storing folder hierarchy in relational database

I have objects representing folders and I'm wondering if they should be represented in the database. On the one hand it seems like the easiest way would be to not represent folder objects and just store a path value for objects contained in a folder. Problems I see with this is that you can't persist an folder whose descendants do not ...

Sql Server Ce 3.5 Check Constraints

Does Sql Server ce Suports Check Constraints? I wanted to do something like "ALTER TABLE WITH NOCHECK ADD CONSTRAINT id_range_check CHECK ( BETWEEN and ) and this will give an error on 'WITH' ...

Using SQl Server CE; Possible to Insert Only If Not Exists?

I'm trying to verify a simple 1 field table to determine if a record exists before inserting a duplicate. if not exists (select * from url where url = ...) insert into url... Can someone Help? ...

Performing Insert OR Update (upsert) on sql server compact edition

I have c# project that is using sqlserver compact edition and entity framework for data access. I have the need to insert or update a large amount of rows, 5000+ or more to the db, so if the key exists update the record if not insert it. I can not find a way to do this with compact edition and EF with out horrible performance, ie takin...

New windows mobile project - LINQ to data in .NET CF?

I have to convert a project I wrote a while back in MCL to windows mobile using CF 3.5. I am using Visual Basic and VS 2008. There is not much info out there, and much of what is, is in C#. I am working my way through that right now. What is the best way for data access? I am used to using LINQ to SQL, but that does not seem to be a o...

SqlCeReplication Conflicts

Is there any connection between error "Failure to write to a message file" and conflicts on Publication side on SQL 2000 server? ...

Can I sync mobile, desktop and web server databases with Sync Framework?

I'm using Sync Framework v1 (which includes Sync Services for ADO.NET v2) and Sync Services for mobile v1. I can sync a SQL Compact Edition database from a mobile device to SQL Express on a desktop PC. I can also sync a SQL CE database from a desktop PC to a SQL Server database on a web server using WCF. I want to sync from the mobil...

Disconnected Data Windows Program using Sql Server Compact

I am going to need to create a small windows application that stores basic data about people. The requirements are: Recruiters go out into the field and gather demographic data about people they talk to. Recruiters return 'home' and contribute their gathered data into the main database (SQL Server 2005). This is the first time I hav...

Windows Mobile Synchronization Error

Hi guys, I am new to Windows Mobile development and have been investigating methods to synchronize data between PDA's running WM6 and a SQL Server 2005 Database. After some research I decided to go with Windows Synchronization Services. I started by looking at the sample: SyncServicesForDevicesSample I downloaded and installed all ...

Get auto_increment ID from SQL Compact Edition

I am prototyping an app using ASP.NET MVC and SQL Compact Edition on VS2008. I have 2 entities that have have a many-to-many relationship with each other. When I save objects to the database through hand-crafted SQL I need to find out what their ID is so I can drop a record into the mapping table between the two entities. The auto_inc...

Connecting to SQL CE db using SQLConnection

Pretty straightforward question. I'm building an app which reads data from a SQL Server 2005 instance. I wanted to run some tests on my laptop (which does not have SQL 2005) so I was looking at swapping in a local database for the purpose of the tests. I'm using VS2008 so the Compact Edition DB seemed a natural choice. I had hoped to j...

Update Listbox

I have bound a ListBox to a SQL CE database with this code: ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:DatabaseWindow}}, Path=Database.Photos1}" This ListBox is populated properly. But when I try to insert a row into the database (InsertOnSubmit + SubmitChagnes), the ListBox is not up...

How to change the column order in a SQL Server Compact Edition table schema?

I'm using Visual Studio 2008 to design a SQL Server Compact Edition database (*.sdf). I had to change the schema of one of my tables adding a new column. I want to "move" that new column from the bottom to a different position in the field list. How can I do this in the Visual Studio designer? EDIT: I know that from a pure technical v...

How to automatically upgrade deployed database for end-users

I've read a fair number of questions on how to upgrade a database for developer and such, and I'm leaning towards using migratordotnet or something similar, however it seems the the upgrades need to be run with something like MSBuild or NAnt. These are not things I should expect an end-user to have installed. Ideally the process should...

handling persistent storage and cold boots with ce 4.2

Hello, I have spent all Friday and Saturday on this and I am running out of ideas; I have a project where I need to run sql ce and .net2.0 on a symbol 8146 device running windows ce4.2 (windows mobile 2003) along with the symbol libraries that are needed for my application. When the device is cold-booted everything in the user partiti...

PPC question

Hi i buield PPC (mobile) program that use sql CE and FrameWork 3.5 (on VS2008) which file's I need to run or install before I'll run my program ? thank's in advance ...

Increasing Windows Mobile 5 Emulator Storage

I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows Mobile 5 emulator, ...

Connecting to SQLCE from windows scripting host on a Win32 platform

Is it possible to connect to SQLCE on a Win32 platform using Windows scripting host? I've tried using the ADODB.Connection activeX object to no avail. ...

Weird Exception with SQL Compact Edition

Hi all, I've deployed my application on a new machine, I've installed the Compact Edition Runtime and got a weird exception. I coudln't locate any info about that on the web furthermore, ways to solve it. Maybe you've encountered it? This is the exception: Type : System.Data.SqlServerCe.SqlCeException, System.Data.SqlServerCe, Vers...