硬件平台: Linux on vmware6 操作系统:Trustix Linux3 SQLITE: sqlite-3.5.7
以下摘自:http://www.sqlite.org/c3ref/open.html
int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ );
If the filename is ":memory:", then an private in-memory database is created for the connection. This in-memory database will vanish when the database connection is closed. Future version of SQLite might make use of additional special filenames that begin with the ":" character. It is recommended that when a database filename really does begin with ":" that you prefix the filename with a pathname like "./" to avoid ambiguity.
我在主线程中使用 int sqlitehandle = sqlite3_open(":memory:", &pdb); 创建内存数据库,并创建表: int rs = sqlite3_exec(pdb, "CREATE TABLE testtbl(id int NOT NULL, name varchar(100))", 0, 0,0);