views:

216

answers:

4

I'm debugging an app on a Windows Mobile device and want to view the data in the SqlCE database on the device. I was told to copy the SDF file from the device onto my dev box, but is there an easier way to do it through visual studio without copying anything over?

I'm using Visual Studio 2005, Compact Framework V2 and Windows Mobile 5.

Thanks

+1  A: 

There is no easier way using Studio, no (Studio '08 has the same limitation). PrimeWorks' Data Port Console does allow viewing device databases from the PC.

ctacke
+1  A: 

In 2008 there is the option of selecting an "ActiveSync connection device" when you add a new connection. This seems to work most of the time although I've had trouble with some devices.

Although I find it's often better to copy the database to the desktop anyway because it's faster to work with.

tjjjohnson
This option is in 2005 as well, I just found it
Charlie
A: 

Do you have to run it on an actual device to debug? If not I would recomend deploying it to the emulator and run with the database in the SD card location which would be present in the file system on your PC. From there you could browse the database at the same time you are running the mobile app.

+1  A: 

I believe if you go to the 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) as your data source there is an option to choose a database from your local computer or from an ActiveSync connected device. As tjjjohnson said, this will be a rather slow way to inspect the database.

Tim Clem