I want recover deleted record and dropped data from SQLite db file,
I check my db file with text editor and i saw dropped data is still there..
I'm using SQLite3.dll (in c#)
but i can`t find something property for open db with dropped data or ...
Is there any library for helping me? or something simple code for recovering data from sqlite db file?
Edit 1:
i try to find a data recovery library or program for sqlite.. after many searchs i found http://www.devart.com/dotconnect/sqlite/docs/Devart.Data.SQLite~Devart.Data.SQLite.SQLiteDump.html
SQLiteConnection.Open();
SQLiteDump sqSqlDump = new SQLiteDump();
sqSqlDump.Connection = SQLiteConnection1;
sqSqlDump.IncludeDrop = true; //<<-- check here
sqSqlDump.Backup();
StreamWriter stream = new StreamWriter("d:\\dump.dmp");
stream.WriteLine(sqSqlDump.DumpText);
stream.Close();
that i can use IncludeDrop
property for backing data to me but this library is not free and i cant use it.. i like to find free library or program...
SQLite deletes data perminently when you delete records. It would be up to you to implement a model where by data was only marked as deleted or maybe a system where you store all versions of the data. You do this by adding fields to mark those attributes. Then when you do selects you change them to account for the new fields functionality.
Like:
select * from mytable where mytable.deleted<>true and etc=etc
SQLite stores all it's data in a single file. If you have a file system backup service in place you could get at old versions of the database.
When SQLite deletes records there maybe ghost data left in the file. This data is just rubbish and won't allow you to reliably get back to a previous point before deletion.
The SQLite db file is binary, be careful editing it with a text editor if you save it will be corrupted!