Dennis, I looked at the .dump feature implementation in shell.c as well as how vacuum is implemented. Based on that an idea will be to iterate through the metainformation on the SQLITE_MASTER table in order to recreate the new Db schema and for each table run SQL statements that will transfer the content from the old db into the new one. However, I was wondering if there is an easier or computationally less expensive way to accomplish the same thing (do it without going through each table) something like "cloning" the B-Tree representing the database.
Iulian. -----Original Message----- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 29, 2006 7:29 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Re: Db copy Iulian Popescu wrote: >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, I wasn't suggesting that you modify the library. It is an open source program. I was suggesting that you "appropriate" some of the source that is used to implement functions similar to what you are trying to do, and incorporate it into your application. The functions in shell.c use the library APIs in the same way as your application. Copy the useful stuff out and modify it to do exactly what you need to do in your own application. It seemed like a good place to start to me. HTH Dennis Cote