Página 1 de 1
SQLite number of active connections
Publicado: Vie Jun 19, 2015 9:21 pm
por emeasoft
Hello Xailers,
Is there any way to know how many active connections the database have?
TIA,
Juliano
Re: SQLite number of active connections
Publicado: Dom Jun 21, 2015 9:18 pm
por jfgimenez
Juliano,
I don't know any way to get it.
However, if you think that your app is going to be used by several users at once, I suggest you to jump to MariaDB. SQLite and MariaDB (or MySQL) are very close in terms of SQL dialect, and it's very easy to replace one by the other. Moreover, it's really easy to support both DB engines in any app. Almost all my programs support both engines, and I select one of them just when I install it in the customer computer.
Re: SQLite number of active connections
Publicado: Mié Jun 24, 2015 7:36 pm
por emeasoft
Thanks José!
But I was needing this exactly to allow just one connection to the database at a time... We will try to figure some way to do it then, thanks!
Regards,
Juliano
Re: SQLite number of active connections
Publicado: Mié Jun 24, 2015 8:36 pm
por ignacio
Try with oDS:Execute( "PRAGMA main.locking_mode=EXCLUSIVE;" )
Regards,
Re: SQLite number of active connections
Publicado: Mié Jun 24, 2015 8:42 pm
por jfgimenez
Juliano,
the solution proposed by Ignacio is explained here:
https://www.sqlite.org/pragma.html#pragma_locking_mode