Friday, March 28, 2008

SQL Compact hotfix released

A hotfix for SQL Compact 3.1 and 3.5 is now available. It solves the following issue related to deletion of rows:

You have an application that inserts many rows into a table. The table is in a database in Microsoft SQL Server 2005 Compact Edition or in Microsoft SQL Server Compact 3.5. The application inserts the rows in multiple threads. Additionally, the application inserts more than 10 rows per second. In this scenario, you intermittently receive the following error message when you try to delete the rows from the table in the database:

Major Error 0x80004005, Minor Error 0. Attempted to divide by zero

Tuesday, March 11, 2008

My wish list for next version of SQL Compact

(In no particular order)

Data events for data binding or similar (triggers)
- in order to know when to refresh the UI or update a cache.

Proper OLEDB provider Office etc. and support for SQL Server Import/Export wizard/SSIS
- this should become available with SQL Server 2008, I have not (yet) been able to make it work, though.

Better multi version tool support 3.1 vs 3.5 vs 4.0
- we can administer SQL Server 2000 and later from SQL Server 2005 Management Studio, why can't we do the same for SQL Compact 3.0 and later?

LINQ to SQL Compact for Devices
- a lightweight implementation, taking advantage of SqlCeResultSet, for example

Sync Services for Devices
- YES, wish fulfilled, as this is now available as a CTP.

Saturday, March 8, 2008

SQL Connections - keeping open and what about threads...

I stumbled across this approach to handling the fact that it is recommended to always keep a SQL Compact connection object open (SqlCeConnection), and also handle that fact that Any instance or static members of type SqlCeConnection are not guaranteed to be thread safe. Looks like a sensible approach.

Thursday, March 6, 2008

ADO.NET Sync Services for Devices CTP

This is now available as a CTP download. This CTP enables Windows Mobile 5.0 and 6 .NET CF 2.0 based applications to take advantage of the Sync Services API. Sync Services is now truly a potential replacement for RDA and to some extent also Merge Replication, in particular when used with SQL Server 2008 Change Tracking enabled. The download consists of the required device CAB files, a sample which includes a device app, a web service and a WinForms app. Only N-tier solutions are supported, meaning no direct connection to SQL Server is possible (as with the desktop based Sync Services). This makes a lot of sense, and reduces the footprint for devices.

The following is required on the device:
- SQL Server Compact 3.5 RTM
- Sync Services CAB
- .NET Compact Framework 2.0
- Device OS: Windows Mobile 5.0 and 6

Development requirements:
- Visual Studio 2008 Professional or higher, with Smart Device Extensions installed.
- The Sync Designer does NOT work within the device project, but generated code from a WinForms project can be reused.

More on the sample to come later...