If you were wanting to copy all of the in-memory database tables to a
file, rather than just one, then the backup api might be another way to
go.

http://www.sqlite.org/backup.html

(I haven't used it myself but the documentation lists copying from
memory database instances to file databases as an application !)

cheers
Owen



-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Doug Currie
Sent: Monday, January 04, 2010 4:32 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] In Memory Usage


On Jan 4, 2010, at 6:35 AM, sasikuma...@tcs.com wrote:

> I'm using SQLite DB version 3.6.12. I recently read about the feature
of 
> In-Memory Database and tried to implement it. I was able to create a
new 
> DB connection in memory, able to create a table and insert some set of

> records into the memory DB. 
> 
> How should I now transfer those records into the real table in the
real 
> DB, someone kindly assist and guide me.

Adding to suggestions by Igor and Simon... You can use the ATTACH
command to attach a disk based db to your memory based db. Then, using
(CREATE and) INSERT statements you can copy records from the memory
based db to the disk based db.

http://www.sqlite.org/lang_attach.html
http://www.sqlite.org/lang_insert.html

e



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to