Windows Phone 8 上的 Sqlite [英] Sqlite on windows phone 8

查看:30
本文介绍了Windows Phone 8 上的 Sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我下载了 win8 手机 sdk 并开始创建我的测试应用程序.在主项目中,我有一个基于 System.Data.SQLite 的类,并希望在我的 Windows 手机应用程序中实现它.

Recently I downloaded win8 phone sdk and started create my test application. In the main project i have a System.Data.SQLite based classes and want to implement it in my windows phone app.

但是 System.Data.Sqlite 包拒绝与 NuGet 一起安装并说无法兼容的 c# 版本"或其他内容.

But System.Data.Sqlite package refuse to install with NuGet and says "Incompartible c# version" or something.

我已经尝试过来自 http://www.sqlite.org 的 sqlite-wp80-winrt-3071500.vsix/download.html,它安装正常,但我什至不知道如何引用 sqlite 库?我想没有像 ADO.Net 这样的适配器,我也找不到可以在代码中引用的确切库.

I have tried sqlite-wp80-winrt-3071500.vsix from http://www.sqlite.org/download.html, it installs ok but i even doesn't know how to refer the sqlite library? There is no such as ADO.Net adapter I suppose and I can't find exact library to refer in code.

在我的测试 WP7 应用程序中,我实现了 System.Data.Sqlite 并且它工作正常,但是我应该用 Windows Phone 8 做什么?

In my test WP7 application I had implemented System.Data.Sqlite and it was working ok but what should I do with windows phone 8?

请帮帮我.可能这是一个愚蠢的问题,但我坚持它.

Please help me. May be it is a dumb question but I am stuck on it.

推荐答案

如果您不介意使用 ORM 而不是 ADO.NET 提供程序,请提供 sqlite-net-wp8 尝试一下(今天刚刚为我正在做的事情创建了它).

If you don't mind using an ORM instead of an ADO.NET provider, give sqlite-net-wp8 a try (just created it today for something I was working on).

sqlite-net-wp8 是一个简单的 C++/CX 包装器,围绕着 sqlite-net 所依赖的一些 sqlite3.dll 导出.它允许 sqlite-net 在 Windows Phone 8 上调用 sqlite3.dll,而不必使用 csharp-sqlite.

sqlite-net-wp8 is a simple C++/CX wrapper around some sqlite3.dll exports that sqlite-net depends on. It allows sqlite-net to call into sqlite3.dll on Windows Phone 8 without having to use csharp-sqlite instead.

按照自述文件中的说明进行操作,看看它是否适合您.如果您遇到任何错误,请告诉我,欢迎提出请求 :)

Follow the instructions in the README and see if it works for you. Please let me know if you run into any bugs and pull requests are welcome :)

这篇关于Windows Phone 8 上的 Sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆