How to view data in SqlCE database on device from visual studio?
I am debugging an application on a Windows Mobile device and I want to view the data in a SqlCE database on the device. I was instructed to copy the SDF file from the device to my dev box, but is there an easier way to do this via visual studio without copying anything?
I am using Visual Studio 2005, Compact Framework V2 and Windows Mobile 5.
thanks
a source to share
No easy way to use Studio, no (Studio '08 has the same limitation). The PrimeWorks Data Port Console allows you to view device databases from a PC.
a source to share
I believe that if you go to Server Explorer (View -> Server Explorer) click the Add Connection button and select Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5) (might say 2.0 in your case), because you can select a database from your local computer or from a connected ActiveSync device as the data source. As tjjjohnson said this would be a pretty slow way to check the database.
a source to share
Do you need to run it on the device itself for debugging? If not, I would recommend deploying it to an emulator and running it with a database in the location of the SD card that will be present on your PC's filesystem. From there, you can browse the database at the same time you launch the mobile app.