Deploying SQL CE for the Compact Framework

Question: I am developing a Pocket PC application and want to use SQL Server CE for the storage of the data. I have SQL Server installed on my development environment and it works fine. How can I get it running on the Pocket PC?

Answer: By default when you set up the development environment of Visual Studio 2003 the files are already placed on your machine. The easiest way is to simply set a reference to the System.Data.SqlServerCE namespace.

This will deploy SQL Server CE to the emulator. If you want to further validate that SQL CE is installed open the Programs menu, which now contains the SQLCE query program as shown below.