#1 2020-08-07 05:42:01

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Occasional sssues with SQLite dbs in OneDrive/Dropbox

Hello,

Update 1: Note, these kinds of issue happens on occasional db files at occasional times - it not always happen, but only sometimes.

Anybody experienced any kind of **occasional** issues that only happens when the SQLite database files are stored in OneDrive or Dropbox?
If **yes**, do you have any clue about how to fix the issue? Thanks!

The following is one of the problems I encountered:

exception class    : ESQLite3Exception
exception message  : Error SQLITE_IOERR (10) [DBOpen] using 3.32.3 with aDB=nil;

main thread ($d50):
00d8b393 +2c3 Program1.exe SynSQLite3          3911 +30 TSQLDatabase.Create
00d9a1ee +06e Program1.exe mORMotSQLite3        800  +1 TSQLRestServerDB.Create

The db file is something like: C:\Users\X360\OneDrive\file1.db

Last edited by edwinsn (2020-08-07 06:38:49)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2020-08-07 05:56:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,230
Website

Re: Occasional sssues with SQLite dbs in OneDrive/Dropbox

Are you able to open the file with a file viewer?
I guess the OneDrive file is not a real file, but a pseudo file, only accessible via the Internet Explorer.

Offline

#3 2020-08-07 06:42:22

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Occasional sssues with SQLite dbs in OneDrive/Dropbox

ab wrote:

Are you able to open the file with a file viewer?
I guess the OneDrive file is not a real file, but a pseudo file, only accessible via the Internet Explorer.

Not sure about earlier versions of OneDrive, but recent versions of OneDrive is just like Dropbox, it's not a virtual drive but only a sub-folder of another physical drive such as D:\

I might didn't describe it clearly, but these kinds of issue only happens on occasional db files at occasional times - it not always happen. So yes, I can open those db files with other sqlite db file viewer, because the issues don't happen all the time.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2020-08-07 06:56:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,230
Website

Re: Occasional sssues with SQLite dbs in OneDrive/Dropbox

May be some sharing rights issues.
The background synch service may have locked the file for exclusive use.

Perhaps just a slepp(10) + retry loop?

Offline

#5 2020-08-07 07:22:20

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Occasional sssues with SQLite dbs in OneDrive/Dropbox

@ab,

slepp(10) + retry loop sounds like the only solution worth trying at the moment...
Thanks!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB