Copying an sqlite database from file to :memory using C#

Posted by davidb on Stack Overflow See other posts from Stack Overflow or by davidb
Published on 2010-03-14T22:47:15Z Indexed on 2010/03/14 22:55 UTC
Read the original article Hit count: 266

Filed under:
|
|
|
|

I have a small database with tables containing a small amount of data which I need to copy into memory.

Currently I am using:

insertcommand.CommandText = "SELECT sql FROM sqlite_master WHERE sql NOT NULL;";

To pull all the table schema from the file database, however I'm not really sure how to proceed with creating these tables in the new memory database, and copying all the relevant data across.


In short, how do I copy an SQLite database from file to memory using C# and System.Data.SQLite?

© Stack Overflow or respective owner

Related posts about c#

Related posts about sqlite