Thank you for the help Andrew and D. Richard Hipp. But how would I do
this (page 24 & 25 of the slides) using the C/C++ interface?
{
sqlite3* pFileDB;
sqlite3* pMemoryDB;
sqlite3_open(fileName, &pFileDB);
sqlite3_open(":memory:", &pMemoryDB);
//****************************************
//WHAT DO I DO NOW?
//****************************************
}
Thanks,
Dave Gierok
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, June 05, 2006 12:49 PM
To: [email protected]
Subject: Re: [sqlite] Memory DB: Load from file
Andrew Piskorski <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 05, 2006 at 12:05:52PM -0700, Dave Gierok wrote:
>
> > Is there a way to load a Sqlite file based DB and then specify we
want
> > that to go into memory? Or is there a more efficient way to create
our
> > memory DB?
>
> You could use attach to copy from an on-disk SQLite database:
>
> http://www.sqlite.org/google-talk-slides/page-024.html
> http://www.sqlite.org/google-talk-slides/page-025.html
>
Andrews suggestion above is better than the sqlite3_raw_write()
routine of my previous post because Andrew's idea is portable.
Use this idea if it is fast enough for you. The raw_write()
thing will be a little bit faster, but as I said, it is subject
to break without warning.
--
D. Richard Hipp <[EMAIL PROTECTED]>