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.

Sqlite : Database locked problem

Xailer English public forum
Responder
Milan Mehta
Mensajes: 134
Registrado: Dom Dic 27, 2009 9:54 am

Sqlite : Database locked problem

Mensaje por Milan Mehta »

I am using Sqlite datasource.
It seems that while insert / update / deleting a record in any table in the databases, entire database file gets locked. So when concurrent users tries to Save record, we get the error : Database locked.
How can we avoid this error ? How do we detect the problem and keep the user in wait mode till other user finishes its operation ?
TIA
Milan.
Milan Mehta
Mensajes: 134
Registrado: Dom Dic 27, 2009 9:54 am

Sqlite : Database locked problem

Mensaje por Milan Mehta »

Ultimately following statement solved my problem.
PRAGMA busy_timeout = milliseconds;
oDS:Execute ("PRAGMA busy_timeout = 10000;")
Thanks
Milan.
Responder