SQL Server CE and its accompanying tools are very clear in their communication.
It's been a while since I wrote the MSDN-articles "No More Drivel: SQL Server CE Delivers" and "DataSet Server CE: Database Connectivity for Windows Mobile-Based Devices". Since then we've welcomed SQL Server 2005 Compact Edition and seen the engine moved into the ROMs of Windows Mobile devices.
I am currently upgrading an eVB-project to .NETCF, which means I am also upgrading the database from SQL Server CE 2.0.
There's a Database Upgrade Tool that upgrades databases from previous versions of SQL Server CE to the latest SQL Server 2005 Compact Edition. The tool is run on the device, is a command prompt utility, upgrade.exe, and it's located in the \Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\...
The tool needs both data engines (source and destination) installed on the device in order to work. Read more here…
Since the tool is a command prompt utility, I prefer using Pocket Controller's command-line interface. The combination of command-line interfaces and path-variables can be painful on devices, so I copied the utility to the device's root, along with the original database.
I ran the upgrade-tool and it failed. The upgrade.log file said:
"Connecting to source database.HRESULT: 0x80004005Error Record 1Minor: 25046"
I sighed. My thoughts: "Here we go again. What DLL is missing? Did I install everything correctly? Did I miss any parameters?", and believed I was up for a lengthy hunt for errors. I spent some time investigating the setup and found nothing wrong.
I picked up SQL Server CE's Books Online and looked up the error code: 25046. The documentation said: "The database file cannot be found. Check the path to the database".
I had misspelled the database name and was reminded that SQL Server CE's error codes are clear and to the point. Back on track again!
Disclaimer The opinions expressed herein are our own personal opinions and do not represent our employer's or any other party's view in any way.