在.NET中的SQLite内存数据库备份备份、内存、数据库、NET

2023-09-04 07:27:48 作者:素衣

如何获得内存数据库备份SQLite的?我创建我的Windows应用程序的数据库。我想利用一个数据库备份的时候我会关闭应用程序。

How to get the SQLite in-memory data base backed up? I create the database in my Windows application. I want to take a database backup when I will close the application.

推荐答案

您想要的 SQLite的在线备份API 。

据我所知,System.Data.SQLite不支持它,所以你需要编写一些code。该System.Data.SQLite论坛包含了一个例子:http://sqlite.phxsoftware.com/forums/t/2403.aspx.如前所述,当你打补丁System.Data.SQLite并调用SQLite的直接,你这样做需要您自担风险。

As far as I know, System.Data.SQLite does not support it yet, so you'll need to write some code. The System.Data.SQLite Forum contains an example: http://sqlite.phxsoftware.com/forums/t/2403.aspx. As noted, when you patch System.Data.SQLite and call SQLite directly you do so at your own risk.