Page 1 of 1

saving/loading memory table to disk/memory

Posted: Sun 27 Jul 2014 09:05
by pwatel
Hi
I have 2 datamodules one connected to a disk sqlite another is a in memory db
I know I can use the batchmove component to go back and forth between 2 tables
but it is very slow compared to the sqllite dll engine.
a) any way to optimize this approach?
b) is there another way ?
like attaching a memory db to the disk connection and using insert queries withing that same connection
Thank you

Re: saving/loading memory table to disk/memory

Posted: Mon 28 Jul 2014 08:21
by AlexP
Hello,

You can transfer data using the TLiteLoader component - the sqlite engine will be used for transfer. You can also work with several SQLite databases in one TLiteConnection and implement data transfer by yourself. For this, you should use the ATTACH DATABASE feature of SQLite: http://www.sqlite.org/lang_attach.html .