SQLite, keep connection open or close every time?

Richard Gaskin ambassador at fourthworld.com
Tue Nov 24 15:42:34 EST 2015


Dr. Hawkins wrote:
> Doesn't a :memory: database get deleted by live code when closed.

I would assume that any memory structure goes away when the process 
using it is completed.


> And as I discovered playing around with sqlite, multiple potential users
> can be a *real* problem.
>
> If a second user tries to open it, it appears to work.  It may even work if
> only one writes, but once there is a write, it gets strange.

In his book Using SQLite, Jay A. Kreibich says that SQLite DBs can be 
read by any number of concurrent users, but can only be written to by 
one at a time, with a further caveat that SQLite itself doesn't impose 
restrictions on writes, so preventing concurrent writes is, as with most 
files, up to the application.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list