Since mango, Windows Phone 7 supports native databases, but it must use LINQ, and this database is stored in an independent bucket. To some extent, this has brought a lot of inconvenience to our database development work. To do a good job, you must first sharpen the tool. The simplest requirement isProgramAfter debugging, I want to see what has happened to the data in the database. This does not seem to support tools in the official SDK.
To solve this problem, two steps are required:
1. the databases of each application are independent and stored in the independent storage space of the application in the form of files, this requires us to take this file out of [simulator/real machine.
2. You can open this file and view its data.
The first step is to browse and export files in an independent bucket. I have seen a tool to introduce a DLL in the project, and then write someCodeAnd then use the browsing software they provide to browse. I personally feel that this is troublesome, and it is a little invasive to the project, and the code needs to be cleared when the program is released. Later I found a tool named "Windows Phone Power Tools", home page in http://wptools.codeplex.com/, this tool can be directly connected to the simulator/real machine without modifying the application code, read data from an independent bucket. The specific usage is very simple. Please directly go to the project homepage, as shown in the figure ~
Step 2: open and read the database content. The extension found through Windows Phone power tools is the. SDF file, which is our database file and exported to your computer. In this case, you can use vs to open it. The specific method is: click "tools-connect to Database" on the toolbar, and select "Microsoft SQL Server compact 3.5" for the data source ", view the database in the Connection Properties and enter the exported database file. Click OK to view the new database connection in the "server resource manager" view. Then how can I view the database data? I believe I will not go into details.
Please indicate the source for reprinting ~ Jin Yanyun
Http://www.cnblogs.com/vistach/archive/2012/02/23/Windows_Phone_WP7_LINQ_Database_DB_View_ SQL _Server_CompactPowerTools_IsolatedStorage.html