How do I view the data in a SqlCE database on a device from visual studio?

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


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.


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.


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.

链接地址: http://www.djcxy.com/p/9078.html

上一篇: 获取资源时不会将其完全读入内存

下一篇: 如何从Visual Studio查看设备上的SqlCE数据库中的数据?