Page 1 of 1

Network SQLite Access

Posted: Mon May 19, 2014 10:24 am
by gummel
Hi!

Is anybody out there who could confirm this issue:

- I have Windows-Share mounted under MacOSX as e.g. "myshare".
- In "myshare" is a SQLiteDB stored.

Now i try to acces this database with this peace of code (PB example!)

Code: Select all

UseSQLiteDatabase()
DatabaseFile$ = "/Volumes/myshare/demo.sqlite"
If OpenDatabase(0, DatabaseFile$, "", "",#PB_Database_SQLite)
    If DatabaseQuery(0, "SELECT * from tablex")
    While NextDatabaseRow(0)
      Debug GetDatabaseString(0, 0)
    Wend
    FinishDatabaseQuery(0)
  else
    debug DatabaseError()
  EndIf
  CloseDatabase(0)
Else
  Debug "Can't open database !"
EndIf
PB can access the database, no error while opening, but the following "SELECT-command" produce an "I/O error".

E.g. Firefox SQlite-Manager works without any problems.

Any hints or is it a bug?

Re: Network SQLite Access

Posted: Sun Sep 20, 2015 3:27 pm
by Fred
I don't think it's a PB bug as we don't do something special when opening an sqlite database.

Re: Network SQLite Access

Posted: Sun Sep 20, 2015 3:37 pm
by bbanelli
gummel wrote:Any hints or is it a bug?
I think it's more of a feature.

https://www.sqlite.org/whentouse.html

Even official documentation discourages such usage (this is just one instance). In addition to that, Windows shares are rather unreliable under OS X in general, at least IME. I really wouldn't use it for anything else than basic file transfer.