简体   繁体   English

将SQL Server CE数据迁移到Windows Phone 8.1

[英]Migrating SQL Server CE data to Windows Phone 8.1

I'm trying to update my Windows Phone app from using Silverlight to Windows Runtime so as to use the new universal application approach. 我正在尝试将Windows Phone应用程序从使用Silverlight更新为Windows运行时,以便使用新的通用应用程序方法。

There's a huge problem though: in Silverlight there is integrated support for SQL Server CE through System.Data.Linq . 但是,存在一个巨大的问题:在Silverlight中,通过System.Data.Linq集成了对SQL Server CE的支持。 I like it very much, but apparently this code is not available in Windows Runtime. 我非常喜欢它,但显然此代码在Windows Runtime中不可用。 Actually, there appears to be no native support for any kind of database in WinRT, but people are happy using the sqlite-net NuGet package for this purpose. 实际上,WinRT中似乎没有对任何数据库的本机支持,但是人们为此感到高兴地使用了sqlite-net NuGet软件包。

So, even if I used sqlite-net , there's still a problem - users will already have the data in SQL Server CE format when the app is updated - how then am I going to convert the data from SQL Server CE to SQLite so that I would be able to access it in Windows Runtime? 因此,即使我使用了sqlite-net ,仍然存在一个问题-在更新应用程序时,用户已经具有SQL Server CE格式的数据-那么我该如何将数据从SQL Server CE转换为SQLite,以便我将能够在Windows Runtime中访问它?

It is not possible to do this on a device, so you must move the SQL CE database elsewhere for conversion to sqlite, and the get hold of the converted database and put it back on the device. 无法在设备上执行此操作,因此必须将SQL CE数据库移至其他位置才能转换为sqlite,并获取转换后的数据库并将其放回设备。 Some kind of web service should be able to do this non-trivial task. 某种Web服务应该能够完成这项重要任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM