Attach to sqlite file over my network

Post your Gambas programming questions here.
Post Reply
CMWhitley
Posts: 4
Joined: Monday 01st February 2021 10:05pm

Attach to sqlite file over my network

Post by CMWhitley » Saturday 23rd October 2021 4:57pm

I have a functioning Gambas3 program which plays very nice with a sqlite database located in the "project" directory of my laptop. I'd like this sqlite DB reside on a network drive so that one of 2 laptops can connect to it, At no time will both laptops try to connect to this DB at the same time.

I've copied the connection "Properties" for this remote drive from my Linux Mint File Manager and played with the first few characters to see if anything works but no joy.

I cannot seem, to get my Gambas3 project to accept a remote location for this file.
$con.Host = "libreelec.local/media/sda1-usb-SanDisk_Ultra_4C/DB"
$con.Host = "//libreelec.local/media/sda1-usb-SanDisk_Ultra_4C/DB"
$con.Host = "sftp//libreelec.local/media/sda1-usb-SanDisk_Ultra_4C/DB" { this is the full connection string direct from my laptop to the remote drive}

This of course does work: $con.Host = Application.path for the local sql file.

I have successfully written, copied, read, launched files, videos from this very directory and other directories for other applications so. I know the drive does play nice over the LAN

User avatar
Quincunxian
Posts: 136
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Attach to sqlite file over my network

Post by Quincunxian » Saturday 23rd October 2021 8:26pm

Hi CM,

The official SQLite Over a Network Caveats and Considerations is here
Even they suggest using a PostgreSql engine.

I've tried this multiple times and like you, still have not been able to get a working version.

MySQL is another option - You should be able to get it installed on your server and then you can handle multiple connections and Gambas handles this really well - I've even had this running from a DB hosted on my ISP's servers.
Cheers - Quin.
I code therefore I am

Post Reply