I am trying to access to an SQLite database that it is in a PC of the LAN (IP 192.168.100.19) in the disk & folder C:\MyFolder
I use this portion of code with no sucess.
Dim sourceDB As FolderItem = GetFolderItem(“file://192.168.100.19/MyFolder/MyDB.sqlite”, FolderItem.PathTypeURL)
Any idea of how which is the correct path to include in the code in order to access to the SQLite database ?
If the folder is shared I would use
Dim sourceDB As FolderItem = GetFolderItem("\\\\192.168.100.19\\MyFolder\\MyDB.sqlite")
If not then
Dim sourceDB As FolderItem = GetFolderItem("\\\\192.168.100.19\\C$\\MyFolder\\MyDB.sqlite")
but you need admin permissions to that machine for this.
Thanks Wayne, but none of them works fine.
Maybe because I forgot to say that I am running the app in a Mac and trying to access the database in a Windows PC… ???
Yes that makes a huge difference, and outside my sphere of knowledge, but I will watch this & learn.
did you try :
Dim sourceDB As FolderItem = GetFolderItem("smb://192.168.100.19/MyFolder/MyDB.sqlite")
Keep in mind that SQLite is not a great choice to use from a network drive. This is from the official Appropriate Uses For SQLite page:
If there are many client programs sending SQL to the same database over a network, then use a client/server database engine instead of SQLite. SQLite will work over a network filesystem, but because of the latency associated with most network filesystems, performance will not be great. Also, file locking logic is buggy in many network filesystem implementations (on both Unix and Windows). If file locking does not work correctly, two or more clients might try to modify the same part of the same database at the same time, resulting in corruption. Because this problem results from bugs in the underlying filesystem implementation, there is nothing SQLite can do to prevent it.[/quote]