Posts Tagged ‘windows-phone’
July 6, 2013 Leave a comment
Every application use some sort of relational database to store state and with linq2sql support you are bound to use it for your windows phone application. If you are storing data in plain files in isolated storage you should definitely check this linq2sql support.
Being able to view data in current database tables certainly helps a lot in debugging/testing. With a few steps, you will be ready to explore any data table of your application that you are developing.
Step 1: Get the file which stores the data.
All the data inside isolated storage is stored in separate files. And, there is a separate file for your database with a “.sdf” extension.
The easiest way to go about this is to install “ISE” extension (Isolated Storage explorer)
Tools -> Extensions and Updates -> Search for “isolated storage”
After installing this ISE extension, look for
View -> Isolated Storage Explorer.
Now, when your application/project is running either on device or on emulator, open Isolated Storage Explorer. In ISE window, press refresh and then download the snapshot. You only need .sdf file.
Step 2: Open the .sdf file in SQL server explorer (present in visual studio)
- View -> Server Explorer
- Right click on Data Connections -> Add Connection
- In “add connection” window
- DataBase -> Browse and select your stored .sdf file
- Password -> Leave this field empty
- Press Ok
- Selected .sdf file will show in Data Connection Tab
- Expand sdf file -> expand Tables
- Right click on Individual Table and click ‘Show Table Data’