Tuesday, December 27, 2005
One application, two database engines
When Microsoft shipped SQL Mobile, we got a new header file to include in our applications: ssceoledb30.h. Unfortunately, this means that you cannot have both the old include file and the new include file on the same exe. You can use the preprocessor to include either one, but this is not what I was looking for: I wanted an integrated solution that would allow me to consume any database (2.0 or 3.0) from the very same exe.
The solution is to merge both header files into just one. While I wait for Microsoft to tell me if I can publish the one I wrote (due to copyright issues, of course) you can have a go at it yourself by diff'ing the two files and figuring out the differences. Not many, actually.
Friday, December 23, 2005
Monday, December 05, 2005
Microsoft SQL Server 2005 Mobile Edition Device SDK
Friday, December 02, 2005
New site, new forum
Wednesday, November 30, 2005
WTL 7.5 Released
Thursday, November 24, 2005
SQL Server Mobile 2005 on MSDN

SQL Mobile has a new home page on the MSDN Mobile Developer Center. There, you can find articles, downloads and other resources on SQL Mobile. Cool stuff!
Wednesday, November 23, 2005
Localized .NET Compact Framework 2.0 Redistributable
Tuesday, November 22, 2005
Saturday, November 19, 2005
Sunday, November 13, 2005
Post-TechDays interview
Ricardo Figueira's Blog (no, we are not related)
Friday, November 11, 2005
RAPI and Windows Mobile 5
Setting this registry key corresponds to the following provisioning script:
<wap-provisioningdoc>
<characteristic type="SecurityPolicy">
<parm name="4097" value="1">
</characteristic>
</wap-provisioningdoc>
Read all about this at its original source.
Thursday, November 10, 2005
TechDays and RAPI speed
In one of the recesses, I was approached by one of my customers complaining about DesktopSqlCe performance when inserting data in bulk. After comparing the insertion performance of Data Port Wizard, DekstopSqlCe was an order of magnitude slower...
My customer's code also needed to be optimized, but that was not the root of the problem. It was in my code. How could that be if both products share most of the base code? On one hand DPW was blasting 11,000 rows in less than 30 seconds over RAPI, while DesktopSqlCe was performing in the tens of minutes range. But wait, I thought, I've seen this before.
When DPW was being developed, I soon realized that synchronous messaging was very slow over RAPI. If after inserting a row in a table (even if the cursor remains open) and you wait for the device to send an acknowledgement message, then you are going to be very slow. So slow as to justify the tens of minutes scenario.
To solve this, DPW uses an asynchronous method of communicating and that is why it does not stop when it finds an error - all errors are reported at the end and are collected asynchronously. This is fast, very fast indeed.
When I wrote DesktopSqlCe I wrongly assumed that my customers would make occasional and rare direct table inserts and updates, so inserts and updates were being delivered in a synchronous fashion, i.e. waiting for a confirmation after insertion or update. This situation is now solved by adding a new attribute to the SqlCeRowset class (similar to the CF 2.0 new SqlCeResultSet class): ReportError. This attribute is of type SqlCeReportError and has two values: Sync (default) and Async. Now you know why.
Saturday, October 29, 2005
Friday, October 28, 2005
Tools support matrix
Just to remind everyone of the Tools support matrix. Actually, this is a funny way of bookmarking this page, huh?
It reminds us that we have to keep all tools under our belt, from eVC3 to VS 2005 (if we are targetting all sorts of devices, that is...).
Waiter! Another Pilsener, please!
Dekuji!
Saturday, October 22, 2005
The IDENTITY issue on SQL Mobile is solved!
Most databases that use IDENTITY columns will do so for primary key or index support, meaning that these values are generally laid out in row creation order. For a table with few deletions, it is very likely that you can find large continuous ranges for which you can let the IDENTITY column do its job - generate the next value.
I write this after finishing my first tests on Data Port Wizard and a new version of the device component. For "well behaved" databases such as the Northwind sample, the code only needs to change the IDENTITY seed twice per table and performance does not seem to be an issue. On databases with sparse tables (where the number of gaps in IDENTITY values is large) performance may be a concern because the base table cursor must be closed before the seed is changed, and reopen again to continue data insertion.
Friday, October 21, 2005
ActiveSync 4.0 Issue Alert
From: Windows Mobile Update
Subject: ActiveSync 4.0 Issue Alert
Microsoft wants to alert you to an issue regarding ActiveSync 4.0 and the immediate steps the company is taking to resolve it and meet customer needs.
Specifically, some users of ActiveSync® 4.0 have reported challenges when using the USB connection of their personal computer to connect to a device with Windows Mobile 5.0. In many cases, these challenges are likely caused by interoperability with desktop firewall applications or applications that manage network traffic. These applications appear to conflict with the TCP traffic between a device and the PC.
An update for ActiveSync is scheduled to be available in late November, but customers may also resolve the issue manually immediately by visiting visiting http://www.microsoft.com/windowsmobile.
This issue only affects people with new devices just coming to market and running Windows Mobile 5.0 software, and only when synchronizing directly to a PC (wireless synchronization via Bluetooth, infra-red or directly to a server or other services are not affected).
- In the U.S., these devices include the Sprint PPC-6700, iMate JasJar, iMate KJam, iMate SP5, Dell Axim X51v,HP iPAQ rx1955 Pocket PC, HP iPAQ hx2495 Pocket PC, and the HP hx2795 Pocket PC.
- In Europe, these devices include the Orange SPV M5000, iMate JasJar, iMate K-Jam, T-Mobile Vario, T-Mobile MDA Pro, O2 XDA Exec, O2 XDA Mini S, O2 XDA Phone, FSC Pocket LOOX N500, Dell Axim X51, Dell Axim X51v, HP PPC series (rx1950, hx2190, hx2490, hx2790).
- In Asia, the devices affected are the iMate JasJar, iMate KJam, iMate SP5 and iMate SP5m.
Microsoft is committed to solving this issue for its customers and its partners.
For more information, please contact the Windows Mobile PR team at 425.452.5400 or usmedteam@webershandwick.com.
Sunday, October 16, 2005
Fast row counting with the ATL OLE DB Consumer Templates
The answer? OLE DB, of course!
Saturday, October 15, 2005
PRIMARY KEY bliss
Now let's wait for some good news on the IDENTITY column issue.
Wednesday, October 12, 2005
Now, it bites...
SQL CE 2.0 allowed consumers to write on IDENTITY columns, a feature that enables copying desktop databases. The table is created on the device with the IDENTITY column set at the given seed and increment. When copying the table data, the column values are forced (the OLE DB provider complains mildly) and the resulting table behaves exactly like the source one. Interestingly, both Jet and SQL Server allow this so why wouldn't SQL Mobile allow it as well?
