# Saving your time: how to work with large reference databases on WP7

DevFeed: [Saving your time: how to work with large reference databases on WP7](<https://devfeed.tech/articles/saving-your-time-how-to-work-with-large-reference-databases-on-wp7-38410.md>)

Original publisher: [Read original article](<https://khmylov.com/2011/11/saving-your-time-how-to-work-with-large/>)

Author: Andrew Khmylov

Published: 2011-11-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Despite the odds](<https://devfeed.tech/sources/despite-the-odds.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Batch file](<https://devfeed.tech/topics/batch-file.md>), [Script](<https://devfeed.tech/topics/script.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Visual Studio](<https://devfeed.tech/topics/visual-studio.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [databases](<https://devfeed.tech/tags/databases.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [development](<https://devfeed.tech/tags/development.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [saving](<https://devfeed.tech/tags/saving.md>), [script](<https://devfeed.tech/tags/script.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>)

## AI overview

This tutorial explains how to speed up development deployments of a large read-only SQL Server CE reference database on Windows Phone 7. It compares isolated storage with packaging the database in the XAP file, then presents a batch-script approach for uploading the database to an emulator and configuring different debug and release behaviors.

## Source excerpt

In the previous post I showed how to load the large SQL Server CE database on WP7. However, if you are working with a read-only reference database, deploying it to the phone or emulator may take up to several minutes. In this post I will try to explain how to save your nerves and time, making the regular development and debugging easier. So for now, there are 2 options for deploying the database with your app: Use Isolated Storage. Upload the database to the device with the help of ISETool. For ~50 mb database it takes 4 minutes on my laptop. Pack it as the application content (setting Build Action to Content). In that case, the database is packed into the XAP file on your machine and then unpacked back on the device. While this approach is a bit faster then the first one, it still takes something about 1 minute to deploy your app, which I find unacceptable. Note that the 1st option should be used only for Debug configurations. The only way to include the reference database when delivering the app to the users is by packing it into the XAP (you may, however, copy it to Isolated Storage upon the first launch, but I don't see any sense why should you do so). So I can't fasten the packaging process, but I can upload my database to the Isolated Storage once and it will be preserved between the application deploys when debugging. When I need to release the application build, I will include the database to XAP file content. Sounds easy. Being lazy motivates me to script the uploading routine. Here is a batch file that takes the IS snapshot with ISETool, adds the database file and restores the snapshot on the emulator: set isePath="C:Program Files (x86)Microsoft SDKsWindows Phonev7.1ToolsIsolatedStorageExplorerToolISETool.exe" set tempPath="C:TempDatabaseIS" set dbPath="your_db_path" set appId=your_app_id %isePath% ts de %appId% %tempPath% copy %dbPath% %tempPath% %isePath% rs de %appId% %tempPath% In the snippet above you need to replace your_db_path with the path to your