In response to your question - by "always continues to fail" I mean that
yes, after delaying and retrying, even when the file should be accessible, I
still get SQLITE_IOERR returned from sqlite3_open_v2. If my application
exits and restarts, it will try to call sqlite3_open_v2 again on the same
file and this time it will succeed, which is why I said the file *should* be
accessible.

Does that make sense and should that be the application's problem, or
sqlite's?

thanks, Serena.


On Tue, Oct 5, 2010 at 11:59 AM, Drake Wilson <dr...@begriffli.ch> wrote:

> Quoth Serena Lien <serenal...@gmail.com>, on 2010-10-05 11:46:18 +0100:
> > On a windows vista/win7 machine or a laptop which goes into sleep mode,
> when
> > it resumes and the application tries to open a database on a networked
> > drive, the open function returns SQLITE_CANTOPEN and SQLITE_IOERR. I
> don't
> > have a problem with this, if the OS has lost access to the network I can
> > imagine SQLITE_IOERR is quite valid. My question is, is there any way to
> > recover now from this error without forcing my application to exit and
> > restart? Any number of retries using sqlite3_open_v2 always continue to
> fail
> > with SQLITE_IOERR.
> >
> > It is possible the response will be "not sqlite's problem", but I would
> > appreciate any advice anyone has to give,
>
> I would say that unless SQLite is returning that error in unwarranted
> cases, this is really an application-level error recovery problem.
> What do you mean by "always continue to fail"?  Is this the case even
> after you have verified that the desired file is accessible?  Are you
> delaying retries at all?
>
> If the IOERR return code is truthfully signaling inability to access
> the file, then if this is an interactive application, you might signal
> the user to request a retry later.  If it's a batch process, you might
> schedule a retry for later.  If there's some alternative way of
> accessing the database or operating at reduced functionality without
> it, you might try that.  It's hard to be more specific without knowing
> what kind of application is being developed.
>
>   ---> Drake Wilson
> _______________________________________________
> 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