First of all thanks for answers. In my question i've been a little concise and didn't explain well. At program start i already load in memory several million records which i keep in customized arrays' structures customized in order to have the most possible speed and the least use of memory (an in memory sql database would not be fast enough and could'nt be optimized for memory usage, at least in the way i do) It's mandatory to keep the data in memory and access it only by indexes (other arrays) otherwise an application run would last hours. After the first run and having analyzed the results the user could: - a) save the results (if the simulation run is considered "rather good") - b) change some "parameters" (in a broad sense) - c) execute a new run. - d) analyze results This process a-b-c-d could be repeated several times. At the end the user compares the obtained results and may save in the local sqlite3 db the best "parameters" and send to the corporate database the results. What i would like to keep in the "in memory" DBs (two DBs) is: - the results (which at the end are not all saved and in case not in the local DB) - what i've been calling "parameters" which are some sql tables. So, only the tables of the "parameters" may (or may not) be saved at program close. The "parameters" table are not large but i fear my cache would be mostly used by the results DB. (Question: do all the in memory DB need to have the same "cache size" ?) Using for them an "in-memory" db could permit me to discard easily all the unsatisfactory changes (i.e parameters' sets which didn't give good results). I had already seen the BackUp demo but i was asking help because in the Sqlite documentation "Using the SQLite Online Backup API" the procedures "loadOrSaveDb" and "backupDb" are very similar but with differences not limited to swapping source. As i do not hnow C i was fearing to risk to miss something trying to convert such code by myself. Tanks again -- edoardo falzetti _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa