Hello Raghu,

it seems to mee that you misunderstand the backup api. This api does not 
"know" or care for your schema and tables, but backups the database 
block for block. In this sense, the api does not know "old" contents and 
can not add "new" content.
The backup api can not help you in your need. You will have to open both 
the in-memory db and the file dm and copy the data you need to back uop 
yourself before deleting it in the in-memory db.
See the attach-command: http://www.sqlite.org/lang_attach.html

Martin

Raghavendra Thodime schrieb:
> Hi,
>     I am using in-memory db where I will execute only inserts. Periodically, 
> I am trying to backup my in-memory db to file based db. But as soon as I 
> backup, I want to clear up the in-memory db so that I will have enough memory 
> for subsequent inserts. So next time when I back up I want to back up only 
> the newly written records. Is there a simple way to accomplish it? Right now, 
> I can't execute delete on in-memory because it will reflect on file db when I 
> back up which is what I don't want.
>
>   What I tried was, as soon as I back up, I close the current in-memory db 
> and open a new one for the subsequent inserts. But next time when I tried to 
> back up to the same old file db, backup operation is overwriting all the its 
> old contents. Is there a way to append to old DB instead of overwriting?
>
> Help will be appreciated...
>
>  Thank You
> Raghu
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to