On 4/18/07, Dan Kennedy <[EMAIL PROTECTED]> wrote:If the win32
SetFilePointer() function fails (used to position the

"pointer" at a given file offset, which SQLite does as part of a
SELECT) SQLite assumes the reason is that the disk is full and
returns SQLITE_FULL. This is probably what's happening here -
SetFilePointer() is saying "the file-system is gone!" and SQLite
is misinterpreting it. Probably SQLite should return SQLITE_IOERR
instead.


True: the error message really through me from the beginning because you
could easily surmise that the database was NOT full.

So why can't you just handle this in the application? Open and
close the database connection when an SQLITE_FULL occurs. If
the device is really shutting down (not starting up) then the
second attempt to open will fail. Or just try every couple
of seconds from that point on.

Dan.


This was one of the suggestions we came up with, however there are dozens of
places in lots of different classes and files that would need this code
added.  By comparison, moving the database to the internal memory store and
backing it up on the Card took about 10 lines of code in one class.  And
others have suggested that it will perform faster from internal memory: if
so, there's an added bonus.

So far, my limited testing here in the office (disconnected, of course) has
not produced any error.  I'm going to the field tomorrow with our field
tester to confirm the solution.  For the first time in a long time I am
confident that what we are doing is going to work.

Thanks to everyone for their input and patience during this thread.  I'll
report back when I know more.

--
Joel Cochran

Reply via email to