On Mon, 25 Apr 2016 13:41:36 Simon Slavin <slavins at bigfraud.org> wrote:
> You may get a better result by adding a timeout before your SELECT: > > PRAGMA busy_timeout=5000;SELECT <whatever> > From: Simon Slavin <slavins at bigfraud.org> Thanks, I just tried that. It's a good ides, but the problem is that the PRAGMA statement echo the timeout value to stdout: sqlite3 "mydbpath" \ "PRAGMA busy_timeout=5000;select distinct value from cal_properties where key = 'CATEGORIES'" 5000 Orange Category Green Category Blue Category Purple Category Blue Category,Holidays Personal I'd have to do some major editing to my queries to reject the 1st row make the query processing very depending on whether or no I use the PRAGMA. Is there a way to surpress the PRAGMA output? THX --Mark -----Original Message----- > Date: Mon, 25 Apr 2016 13:41:36 +0100 > To: SQLite mailing list <sqlite-users at mailinglists.sqlite.org> > Subject: Re: [sqlite] sqlite3 command line, read-only > > On 25 Apr 2016, at 1:33pm, Mark Foley <mfoley at novatec-inc.com> wrote: > > > I am using sqlite3 3.7.17 on Linux Slackware64 14.1. I use the sqlite3 > > command every 10 minutes to query several Thunderbird calendar databases. > > Occasionally, I > > have a message, "Error: database is locked"; understandable since > > Thunderbird > > is occasionally updating its database. > > You may get a better result by adding a timeout before your SELECT: > > PRAGMA busy_timeout=5000;SELECT <whatever> > > This allows SQLite to retry the operation for up to 5 seconds before it gives > up and returns the above error. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >