Cross-Language SQLite access at the file level?

Suppose that I have a SQLite database file created using XOJO. Can that same file be accessed or maybe even modified from a python program? I would take care, of course, that the file is open by one server at a time; at the moment I am not sure how to assure that but the first question is whether or not it can be done!

Many thanks
Jim Wagner, Oregon Research Electronics

It can be done by a python program running on the same machine. SQLite files are not meant to be accessed across the network.

Thanks, Tim -

I was thinking of same machine or maybe (big maybe) duplicate files propagated by DropBox.

Here is the situation. I use KiCad, which is a circuit board layout “IDE”. It maintains a component data base which can be accessed via python helper apps. The code for those helper apps IS available so all of the necessary hooks seem to be laid out. I would like to write a helper app that copies particular data from the KiCad database to a more elaborate inventory management database that I am creating in XOJO. Now, there is an alternative route of having KiCad output its component information as a comma-separated-value text file, then parsing that file using XOJO into my own data base. I suspect the CSV route may be the more desirable since it is less sensitive to KiCad version changes. However, simply knowing that I have two possible routes reduces the stress level a lot.

Again, thanks Jim

AFAIK this is no longer true since 2010: Write-Ahead Logging

  1. WAL provides more concurrency as readers do not block writers and a writer does not block readers. Reading and writing can proceed concurrently.

And sure, this also works across the whole Network.

From your link

  1. All processes using a database must be on the same host computer; WAL does not work over a network filesystem

If you have used it “succesfully” over a network, you’ve just been lucky.

2 Likes

Dang! :slight_smile: Thanks, I actually got lucky then. But I only use something like this on a private NAS and in the local network.

That won’t help. This comes up regulalry on the SQLite Users Forum. SQLite uses file locks for concurrency, and Network File Systems are bad at this, see:

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

Thank you. I’ve already started to replace it with a MariaDB10 mySQL-Database. :+1: