Hello Xailers,
Is there any way to know how many active connections the database have?
TIA,
Juliano
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
SQLite number of active connections
Re: SQLite number of active connections
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.
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
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
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
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: SQLite number of active connections
Try with oDS:Execute( "PRAGMA main.locking_mode=EXCLUSIVE;" )
Regards,
Regards,
Re: SQLite number of active connections
Juliano,
the solution proposed by Ignacio is explained here: https://www.sqlite.org/pragma.html#pragma_locking_mode
the solution proposed by Ignacio is explained here: https://www.sqlite.org/pragma.html#pragma_locking_mode