Thank you very much, but this will require to modify the library as far as I understand. I would rather not do that, is that any other less intrusive way?
Iulian. -----Original Message----- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 6:50 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Re: Db copy Iulian Popescu wrote: >I'm really sorry - I forgot to mention that both databases are in memory. > > > > Iulian, In that case you will have to copy the contents. The easiest way to do that is probably to modify the code the sqlite shell uses to do a database dump. Instead of writing the generated SQL out to a file like the dump command does, execute the generated SQL statements to create the same tables and records in the second attached database. The shell command is implemented in a few functions in shell.c. I believe there is some similar code in the vacuum functions that copy the entire database to a new file without converting everything into SQL text. This might be faster. You can look at the code in vacuum.c HTH Dennis Cote