Using SQLite as a multi-user database?

Trevor DeVore lists at mangomultimedia.com
Tue Nov 23 07:42:13 EST 2010


On Tue, Nov 23, 2010 at 7:10 AM, Fredrik Andersson <fredrik at morbug.se>wrote:

> From reading on the SQLite website I get the impression that it IS possible
> to use SQLite as a multi-user database even though it's not its primary
> purpose. I recently made a small application that was used by very few
> people and the app didn't implode or anything.
>
> My question is: Does anyone have any experience using SQLite as a
> multi-user database? If the answer is yes:  did it work? (or didn't it?) Any
> hints on what to do to keep things running smoothly? The users will be on
> WinXP if that makes any difference.


I have customers that have used a product of ours in a multi-user setting
with SQLite (even though we tell them we don't support this). The errors I
have seen relate to queries failing because SQLite is busy handling a write
operation by another user.

I haven't had any reports of data corruption though. Not to say it hasn't
happened, I just don't recall any reports of it.

I think you could test your code against this scenario by starting a
transaction in one client and have the client wait for some extended period
before closing the transaction (i.e. 10 seconds). While the transaction is
open, try various queries against the db using another client and see what
errors you get back.

-- 

Trevor DeVore

Blue Mango Learning Systems

ScreenSteps: http://www.screensteps.com

Releasable Revolution Resources for Developers:
http://revolution.bluemangolearning.com



More information about the use-livecode mailing list