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

0


a source to share


5 answers


In 2008, when adding a new connection, you can select "ActiveSync connection device". This seems to work most of the time, although I have had problems with some devices.



Though I often find it better to copy the database to the desktop as it is faster.

+1


a source


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.



+1


a source


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.

+1


a source


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.

0


a source


I used WebMatrix to open the folder where the DB Compact SQL file DB_Data / database.sdf was created and worked like a charm

0


a source







All Articles