Network SQLite Access

Mac OSX specific forum
gummel
User
User
Posts: 11
Joined: Sat Mar 22, 2008 11:26 am

Network SQLite Access

Post 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?
Fred
Administrator
Administrator
Posts: 16681
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Network SQLite Access

Post by Fred »

I don't think it's a PB bug as we don't do something special when opening an sqlite database.
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: Network SQLite Access

Post 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.
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Post Reply