Windows phone 7 如何将SqlCe数据库部署到windows phone的isolatedStorage中
比如说,我想使用一个现有的SqlCe数据库,其中包含数据。我不确定哪种方法最好 1) 以下是为Windows phone创建SqlCe数据库的常规方法 using (CountryDataContext context = new CountryDataContext(ConnectionString)) { if (!context.DatabaseExists()) { // create database if it does not exist context.CreateDatabase(); } } 使用(CountryDataContext上下文=新的CountryDataContext(ConnectionString)) { 如果(!context.DatabaseExists()) { //如果数据库不存在,则创建数据库 context.CreateDatabase(); } } 但是这个数据库中有数据,所以我不想创建它。我想将其部署或存储在isolatedStorage中 我该怎么做??我想使用数据库中已有的数据Windows phone 7 如何将SqlCe数据库部署到windows phone的isolatedStorage中,windows-phone-7,sql-server-ce,Windows Phone 7,Sql Server Ce,比如说,我想使用一个现有的SqlCe数据库,其中包含数据。我不确定哪种方法最好 1) 以下是为Windows phone创建SqlCe数据库的常规方法 using (CountryDataContext context = new CountryDataContext(ConnectionString)) { if (!context.DatabaseExists()) {
谢谢您可以将数据库文件作为内容包含在应用程序项目中,然后在构建时将其放入XAP并复制到手机上的应用程序安装目录中 你会修改这个数据库吗?
# Copy data from IS to directory
ISETool.exe ts xd <PRODUCT-ID> "C:\TempDirectory\IsolatedStore"
# Copy data to IS from directory
ISETool.exe rs xd <PRODUCT-ID> "C:\TempDirectory\IsolatedStore"
#将数据从IS复制到目录
ISETool.exe ts xd“C:\TempDirectory\IsolatedStore”
#将数据从目录复制到IS
ISETool.exe rs xd“C:\TempDirectory\IsolatedStore”
好东西。信息性信息。让我先读一遍。稍后将公布结果。感谢您提供的提示和注释。我很高兴在Windows phone中看到SQLCe。请看这篇博文:神奇的东西。SQLCe是一件很棒的事情。将为您的链接添加book标记。稍后将完成我的工作并发布结果。请使用V2005演示如何安装sqlMatel,从何处获取SqlMetal以生成数据库类?在VS2005中使用SQl命令提示符时,它会显示类似“Sqlmetal未内部重新设定”。SQLServer2005Express可以管理SqlCe数据库吗?想要在那里输入数据。LINQ到SQL/SQLMetal需要.NET 3.5和VS 2008谢谢。现在对SqlMetal使用VS2008和VS2008命令提示符。生成数据库类文件时出现问题。我在这里发布了: