3

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?

1
  • had you able to fulfill your need?? I am also looking for the same apis in C# program. if yes please help me on this as well. Commented Jan 18, 2011 at 5:57

1 Answer 1

0

See Example 1: Loading and Saving In-Memory Databases on the SQLite Online Backup API page.

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

2 Comments

That is fairly helpful, however, I am not sure how to use those functions when using the ADO style of System.Data.SQLite
Further research suggests that these functions are not yet available in System.Data.SQLite, but the developer states that they are "coming soon"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.