如何打开一个内存数据库文件到sqlite3的 [英] How do I open an in-memory database file into sqlite3

查看:745
本文介绍了如何打开一个内存数据库文件到sqlite3的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有访问磁盘的系统上。我的C程序在内存中有一个有效的,小的,sqlite3的文件(通过网络接收)的内容。我想用sqlite3的的C API来打开和访问该文件(只读是罚款)。

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(:记忆:&放大器;富)

但没有任何办法打开我现有的数据库?我没有权限来创建一个RAM磁盘,但也许类似的规定?谢谢你。

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这里(C)例如:

Code example here (in C):

<一个href=\"http://www.mail-archive.com/sqlite-users@sqlite.org/msg15929.html\">http://www.mail-archive.com/sqlite-users@sqlite.org/msg15929.html

这篇关于如何打开一个内存数据库文件到sqlite3的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆