2

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.

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

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.

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.

1 Answer 1

5

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 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 :)

Sign up to request clarification or add additional context in comments.

12 Comments

I just pushed an important bug fix where string columns weren't being bound to properly. Please update your sqlite-net-wp8 source if you are still giving it a try. Let me know if you run into any problems!
Peter.. I just found that today... I was coming back here to follow up... Awesome that you beat me to it :) Great job.
Thanks, @DanielEgan. Please let me know if you find any bugs.
@Peter, I just started trying to use sqlite-net with C#-SQLite but don't know, what should be the connection string? Uri will be good but I haven't see that option.
@gleb.kudr: sqlite-net uses a path to a file in the constructors for SQLiteConnection and SQLiteAsyncConnection. That's all you should really need. If you're developing for Windows Store or Windows Phone 8, you'll want a path under ApplicationData.Current.LocalFolder.Path.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.