in

System.Data.SQLite

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

Load the database from stream.

Last post 02-07-2008 9:43 AM by Sam_. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-06-2008 2:58 AM

    Load the database from stream.

    Hi. We are working on a helpdesk solution where users can upload a sql-lite database (which we use in a program of ours). We want to be abel to remove sensitive data from the database before its stored in our database. In order to do this, we want to access the database from a stream, in this case a memory stream. Is it possible to load the database from a stream rather than having to pass a filename-string? Scanning the sdk didnt reveal any solution for this. Since this provider is open source I guess implemeting support for it ourselfs wont be to much of a effort...

     Kind regards olof

  • 02-07-2008 9:43 AM In reply to

    • Sam_
    • Top 10 Contributor
    • Joined on 02-14-2007
    • Washington DC
    • Posts 86

    Re: Load the database from stream.

    SQLite does support memory databases, but afaik it does not support specifying what memory to use for the memory database and does not support dumping a memory database to disk (although the latter has been asked for many times).

    As far as implementing it yourself, both System.Data.SQLite and sqlite core are open source so it's certainly an option, but keep in mind that sqlite is written in C and most of the changes have to be made there, so you need to have C developers available to do it. Not everyone on this forum realizes that the core engine is a C library.

    In a fairly recent edition of sqlite the core developers changed the way it works with the underlying operating system to add more abstraction in the form of a virtual file system.  This change will make the task of working with an existing memory stream much easier than it would have been previously.  Of course you'll also need to change the wrapper to support passing the stream along to the core, and of course the stream needs to be seekable.

    HTH,

    Sam 

    We're hiring! B-Line Medical is seeking .NET Developers for exciting positions in medical product development in MD/DC. Work with a variety of technologies in a relaxed team environment. See ads on http://careerbuilder.com.
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems