Here is the problem that I am having
with SQLite with encryption extension enabled, and I need help.

I have an application that creates
and saves some data in a SQLite database. I am using SQLite v 3.6.14, accessing
it through the native dll form a C# WPF application. For some reason that I
cant figure out am getting a corrupted file with some strange characteristics
in some rare instances.

First of all there some significant
rows of a table are missing and another table whose structure is intact has all
the rows empty.

Second I am able to open the file
with SQLite browser application (specially compiled for my license of SEE of
course), but there are some Sql statements that do not work. A simple select on
the partially filled table works, for example, but any select statement that
involves aggregate functions (count, average, max min, distinct etc...) do not
work.

Third, I open the file with a text
editor and I see that a significant chunk of the file towards the end is filled
with the NUL character which is unlike all the other files that are not
corrupted.

This is the way my C# application
works with the files: 1. Start transaction


 Write to table 1
 Write to table 2
 Write to table 3
 Write around 80,000 rows in table 4
 Write data to table 5 based on aggregate data from
     table 4
 Commit transaction


Table 4 has thousands of rows
missing and table 5 is empty all together. Before someone states the obvious, I
can see that there is no surprise that table 5 is empty since aggregate
functions are not really working on table 4. But the question is what can lead
to this kind of corruption where data write can stop after some thousands of
rows and aggregate functions not working.

Does anyone have any idea why this
is happening? My problem is further complicated by the fact that I am not able
to reproduce the problem for the life of me; it only happened to one of our
clients, and they are not able to tell me anything that is useful to determine
the sequence of events that lead to this file corruption.

I do try to handle all exceptions in
the application, but when this problem happens no exceptions are thrown by the
application or the underlying SQLite library.Thanks for the help. Dawit



 

                                          
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to