in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

SQLite support for Silverlight

Last post 12-12-2009 2:15 PM by cristoph2009. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-05-2009 11:52 AM

    SQLite support for Silverlight

    Hello,

    Is there any way to support SQLite in Silverlight? Let's say I have a SQLite database in Isolated Storage and want to connect that database from Silverlight without using any service.

    Do we need to create our own database driver? I'm also a WPF/Silverlight developer but I'm not familiar with that field so that I'm looking for some helps from you guys. It would be really great if you guys can share me some concepts or links or code or etc.  If you are not familiar with Silverlight but interested to add SQLite support in Silverlight then let me know. I will try to answer as much as I can for Silverlight questions.


    Thanks in advance.

    Regards,
    Michael Sync

  • 03-05-2009 12:00 PM In reply to

    Re: SQLite support for Silverlight

    I actually answered that on the sqlite list but I guess nobody's seen it yet...

    From the reply:

    It can't be done, sorry.  There's no support for P/Invoke in Silverlight
    (requires full trust).  Since SQLite is a native library, there's no way to
    use it without p/invoke unless someone took the entire engine and rewrote it
    in fully managed code.

  • 03-05-2009 12:10 PM In reply to

    Re: SQLite support for Silverlight

    Thanks, Robert. 

     

  • 03-05-2009 12:11 PM In reply to

    Re: SQLite support for Silverlight

     Basically it all boils down to "Silverlight doesnt support P/Invoke".  SQLite is an unmanaged dll which is merge-bin'd into the System.Data.SQLite assembly during build time.  Also I dont think Silverlight has any of the required bits of System.Data to make an ADO.Net provider work. AIR supports SQLite by directly embeding the SQLite dll into the AIR runtime. 


  • 03-05-2009 12:28 PM In reply to

    Re: SQLite support for Silverlight

    Thanks again, Jeffery. 

    I will look for other alternative. I found the following links from Google. I hope one of them should be able to port it to Silverlight. 

    http://sharphsql.codeplex.com/
    http://sourceforge.net/projects/hypernetdb

     

     

  • 03-05-2009 12:37 PM In reply to

    Re: SQLite support for Silverlight

    I have just checked SharpHSQL code and found that it's heavily rely on System.Data. 

    Seems like we need to port Mono System.Data source code to Silverlight first. 

  • 08-10-2009 8:27 AM In reply to

    Re: SQLite support for Silverlight

    Check out this post about ability to work with SQLite under Silverlight.

    http://sqlite.phxsoftware.com/forums/t/1879.aspx

    May be it should be Feature Request to suppory C#SQLite?

  • 12-12-2009 2:15 PM In reply to

    Re: SQLite support for Silverlight

    You can use siaqodb ( http://siaqodb.com) as Silverlight client side database.You can save objects with one line of code and retrieve back via LINQ
Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems