I've been digging around SQL Server Everywhere (SQLEv) quite a bit lately. It's been great to have the simplicity and portability of SQL Mobile on the desktop. Most of my SQL Mobile code that I've ported to SQLEv has done so with little or no code changes.
Most that is….
While porting some working SQL Mobile Merge Replication code over to SQLEv, I started getting a rather unhelpful error message "Internal Error: Invalid reconciler parameter".
After a great deal of pain (and a few emails to the right people), I found out that the cause of the problem has existed for many years - It's just that the scenario that creates the error is much more likely on a Windows desktop then on a Windows Mobile device.
Remember - SQLEv uses the same server tools to perform Merge Replication as SQL Mobile does.
While doing a synchronize with the server, the client (SQLEv or SQL Mobile app) sends several parameters to the SQL Mobile/SQLEv server agent. The server agent has a series of 128 character buffers to store the parameters.
(Here's the big finale) One of the parameters sent to the server agent is the fully qualified pathname of the local database file. In Windows Mobile one is reasonably unlikely to have a local pathname greater the 128 characters.
In a desktop application, it's very easy to have a local pathname greater then 128 characters. In fact in many cases creating a SQLEv project in the default VS project folder (C:\Documents and Settings\Jim Wilson\My Documents\Visual Studio 2005\Projects) will cause the error. Yet if you move the project folder directly under the C-drive root, things work just fine (shorter filename).
I haven't heard what the long-term solution to the problem will be but it seems to me two things have to happen.
- The server tools must support the standard MAX_PATH length of 260 characters
- When a file name is too long (or any other parameter that violates the requirements) - give us an error messages that actually tells us what happened not "Internal Error: Invalid reconciler parameter".
So the moral of the story: Be sure to create all of your SQLEv projects close enough to the drive root that the fully qualified pathname of your db file at runtime will fit in the server agent's 128 character buffer. The same goes for deployment if you happen to be deploying programs using the SQLEv CTP.
Posted
Jun 18 2006, 07:51 PM
by
jim-wilson