Wednesday, September 29, 2010

Sync Framework news roundup

Sync Framework 2.1 is now available.

Notable features include: SQL Azure Synchronization, and support for SQL Server Compact 3.5 SP2 (which includes new APIs for managing change tracking in code).

The Sync Framework Team has also published a code sample, which demonstrates a Sync from SQL Azure to SQL Server Compact.

If you are using Sync Framework, make sure to follow JuneT’s blog. The latest entry concerns Sync Framework Provisioning (creation of metadata to support Sync Framework) and the new Deprovisioning API in Sync Framework 2.1.

To help you prepare a database for Sync, a tool is now available on CodePlex: SyncPrep.

Monday, September 20, 2010

SQL Server Compact 3.5 SP2 downloadable update list

The updates for SQL Server Compact 3.5 SP2 are now referred to a CU (Cumulative Update), which is what the hotfixes also were previously. The difference now is that the CU installation overwrites the existing installation, and a remove of the RTM bits is no longer required before installing the CU.

The table below gives an overview of the current CUs. All CUs apply to SQL Compact 3.5 SP2, version 3.5.8080.0.

Build KB Title Platforms
8081 982565 FIX: "An SqlCeParameter with ParameterName '<Parameter Name>' is not contained by this SqlCeParameterCollection" error message when you use the .NET Compact Framework Data Provider for SQL Server Compact to access SQL Server Compact 3.5 x86, x64
8082 983516

FIX: A Deadlock occurs when two transactions try to perform a DML operation on a table that contains a TABLOCK locking hint or an XLOCK locking hint

x86, x64
8082 2300599 FIX: Heap corruption occurs when you use SQL Server Compact 3.5 Service Pack 2 x86, x64
8083 2361070

FIX: Some "Image" column content does not open in SQL Server Compact 3.5 SP2 after the "SqlCeEngine.Compact" or "SqlCeEngine.Repair" method is called

x86, x64
8084 2479589

FIX:"A call to SQL Server Reconciler failed" error message occurs when you try to add or reinitialize a subscriber of SQL Server Compact 3.5 for a merge publication

Server Tools only,
x86, x64
8085 2494715

FIX: Incorrect result when you run a query that contains a conjunction and a disjunction in SQL Server Compact 3.5

x86, x64
8087 2585082 FIX: "A specified value violated the integrity constraints for a column or table" error if the merge publication contains many articles and constraints in SQL Server Compact 3.5 x86, x64
8088 2527494 A hotfix is available for SQL Server Compact 3.5 SP2 that adds support for replication with SQL Server "Denali" x86, x64, Server Tools, WinCE 5,6,7 (?)

8089

 

2665342

Incorrect sort order for a subscriber in SQL Server Compact 3.5 SP2 which synchronizes with a publisher in SQL Server

Server Tools only,
x86, x64

8092 2718718 FIX: "Cannot open the shared memory" error message when you try to create or open a SQL Server Compact 3.5 SP2 database file on a shared network folder x86, x64
8109 2860310 FIX: Incorrect results when you run a query that uses a LIKE operator in a WHERE clause in SQL Server Compact 3.5 x86, x64, Server Tools, WinCE 6,7

Please let me know if there are errors or omissions.

Monday, September 6, 2010

New book: .NET Compact Framework 3.5 Data Driven Applications

A new book has been published this spring, which supplements the other books available on Windows Mobile development with SQL Server Compact. It covers from a very practical and hands-on perspective many facets of Windows Mobile development (now a legacy platform). It attempts to cover use cases for even the more obscure Windows Mobile technologies, like MSMQ, Infrared and Bluetooth, and Pocket Outlook, so it cover a lot of ground.

In terms of data access, there are three chapters devoted to various aspects of this domain:

Building the Data Tier: Describes how to build a data provider independent data layer, and implement this with both SQL Server Compact and Oracle Lite.

Building Search Functionality: Describes how to implement a standard parameterized search function, and also how to implement full text search for SQL Server Compact (a question often asked in the MSDN forums).

Data Synchronization: Describes how to implement Microsoft Sync Services on Windows Mobile, including adding filters and conflict resolution.

Optimizing for Performance: Describes how to optimize for performance using caching and indexes. As the data access layer is based on DataSet, there is no mention of using SqlCeResultSet, Seek and similar APIs for SQL Server Compact.

You can read more about the book here.

Thursday, September 2, 2010

SQL Server Compact Toolbox add-in now supports version 4.0 databases

The latest release of the SQL Server Compact Toolbox, an add-in for Visual Studio 2010, includes support for version 4.0 (CTP1) SQL Server Compact database files in addition to version 3.5 files.

To start using the add-in with version 4 files, download and install the latest release (1.4 at the time of writing this).

Using 4.0 files with the add-in

Create the file, using either SqlCeCmd40, WebMatrix or another tool, that supports 4.0.

Create a permanent connection, by selecting “Add SQL Server Compact 4.0 Connection”:

image

The simple dialog allows you to build the connection string and test it.

image

When you select “Save”, the connection information is saved in a version 3.5 database file here:

C:\Users\<Username>\AppData\Local\SqlCe35AddinStore.sdf

(An empty database is included as an Embedded Resource with the add-in, to see how to extract this to a sdf file using C#, see the DataConnectionHelper.cs in the source).

To remove the connection, select a version 4 connection in the tree, and select “Remove Connection”.

image

When the Visual Studio Server Explorer support for version 4 arrives, the add-in will be updated to enumerate your version 4 connections from Server Explorer rather than having a separate store for these.