0

Can I load a disk-database file (.db) to a in-memory database created by :memory: in Sqlite? I am using Mono, and Mono.Data.Sqlite is the library I am linking to. Does anyone know how to do that? or can anyone point me to a document for this library? Thanks!

-gb

1 Answer 1

1

you should use the SQLite Backup API. here is a couple of links.

Using the SQLite Online Backup API

Online Backup API

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

6 Comments

Thanks for your reply! The problem is all those functions are C functions. But what I can use in Mono is an ADO.Net provider and has no functions as these...
@gambellhq, if you want to take advantage of SQLite specific features you'll need to use SQLite specific code, not just standard ADO.NET APIs. Even if Mono doesn't expose these functions, you can call them directly with the right pinvoke calls (we do this with SQLite on Windows in .NET, so I assume Mono would work the same).
@Samuel, thanks! I am new to Mono and Sqlite, can you give a brief example about how I can make pinvoke calls to its C function?
@gambellhq, your best bet is to look at the included SQLite wrapper source (not the core C code, the MONO code that calls into SQLite).
@Samuel, OK, will do that. Thanks!
|

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.