I think I have DONE :) I miss one more PRAGMA to copy, the schema_version, which creates the conflict with Firefox, and results a corrupt database. Now everythings work fine. I have only one question: how can I query all the PRAGMAS? I am useing an SQLite library in Delphi, I think that I should use Sqlite3_Prepare_v2, it has a parameter Stmt:pointer; but I dont know how to work with this and obtain for example: PRAGMA page_size; ---> 26
Again, thanks to everyone for help, and if someone can help me in this final problem I will appreciate. csabi81 wrote: > > I have done again a test, its nice to work with you guys :) > > So, I query all the PRAGMAs from the original database, and note them, > temporary on a sheet of paper; > then after dooing a .dump obtain the hole schema of the database, CREATE > TABLE, INDEX, INSERT stc..., saved in a file. I append from the begining > the PRAGMAS, and than create the datanase file based on this schema file. > Good and bad news: the good one is that the size of the file is exactly > the same as the original one, the bad news is that firefox3 still cannot > work with the cloned database. > Is there a priority on how to apply PRAGMAs? this is the only thing I can > imagine that can affect the cloned database file. :( > > Thanks to all > > > > csabi81 wrote: >> >> Thanks Steve, I think I am on the right way. >> It is a difference between the page sizes of the two databases. I have >> opened each database with Firefox SQLite Manager, and at the DB Settings >> I have seen a lot of differences, such as page size, Cache size, max page >> count etc. How can I Copy all these settings from the original DB to the >> clone. Is there a safe way, or I can only copy one by one, by querying >> and setting these Settings? >> >> Thanks >> >> >> Steve Kallenborn wrote: >>> >>> Could there be a different page_size, resulting in differing amounts of >>> 'wasted' space? >>> >>> Check with "PRAGMA page_size;" or sqlite3_analyzer program. >>> >>> Thanks >>> Steve >>> >>> csabi81 wrote: >>>> I have made .dump for each database, original and clone, and saved into >>>> separated files. Than compare them. >>>> Differences are in INSERT INTO entries, in the clone database those >>>> entries >>>> are missing which I did not copy from the original. But the CREATE >>>> TABLE, >>>> CREATE INDEX, CREATE TRIGGER Commands are the same 100% >>>> >>> _______________________________________________ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Clone-SQLite-databases-tp18827472p18869124.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users