I'm on a system with no access to disk. My C program has in memory the contents of a valid, small, sqlite3 file (received over the network). I would like to use sqlite3's C API to open and access this file (read-only is fine).
How do I do this? I know I can create an empty in-memory database with
sqlite3_open(":memory:", &foo)
but is there any way to open my existing db? I don't have the privileges to create a ram disk, but perhaps something along those lines? Thanks.
Code example here (in C):
http://www.mail-archive.com/sqlite-users@sqlite.org/msg15929.html
来源:https://stackoverflow.com/questions/837067/how-do-i-open-an-in-memory-database-file-into-sqlite3