Really basic SQLite questions

Kay C Lan lan.kc.macmail at gmail.com
Mon Apr 28 01:26:41 EDT 2014


On Sat, Apr 26, 2014 at 12:04 AM, Mike Kerner <MikeKerner at roadrunner.com>wrote:

> Bob, I agree that in general...  Since SQLite is a local file-store DB,
> it's a little different.  it isn't designed for transaction loads,
> multi-users, etc.
>

Which is why I'll offer one instance where it may make sense to open/close
the connection after each query - during development. Because SQLite is not
designed for multi-connections it makes it hard to troubleshoot unexpected
results with another db Management Tool. I also note that some management
tools I consider better than others because they DO close their connection
after each query whilst others do NOT - which you'll eventually figure out
by the new errors you get when you can't get LC to access the Tables you
previously could.

So I eventually learnt to open the SQLite db, do my query, close. Has sped
up my development process no end. YMMV. In the end, it's actually so fast
that I usually don't even bother changing it after everything is sorted
out, although if there is a sequence of Queries I will only open at the
beginning and close at the end.



More information about the use-livecode mailing list