[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-03-01 Thread Vince Scafaria
Jim, I am running simple select statements against views; I am not inserting into them or anything unusual like that. Also, my earlier comment re attach database was a red herring. I hit the "statement aborts" without that. Lastly, to be clear, the "SQLite error (17): statement aborts..." is

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-03-01 Thread Vince Scafaria
Jim, I am running simple select statements against views; I am not inserting into them or anything unusual like that. Also, my earlier comment re attach database was a red herring. I hit the "statement aborts" without that. Lastly, to be clear, the "SQLite error (17): statement aborts..." is

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-03-01 Thread Richard Hipp
On 2/29/16, Vince Scafaria wrote: > Richard, I can confirm that having a writable connection open first, prior > to trying any reads, does avoid the "database is locked" error. However, I > still do get "SQLite error (17): statement aborts" errors. What are the > rules I must follow to avoid

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-03-01 Thread Vince Scafaria
One possibility: Does ATTACH DATABASE count as a schema change? From: Vince Scafaria Sent: Monday, February 29, 2016 10:31 PM To: 'sqlite-users at mailinglists.sqlite.org' Subject: Database is locked (wal) - purely from read-only connections/queries Richard, I can confirm that having a

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-03-01 Thread Vince Scafaria
Richard, I can confirm that having a writable connection open first, prior to trying any reads, does avoid the "database is locked" error. However, I still do get "SQLite error (17): statement aborts" errors. What are the rules I must follow to avoid getting these SQLITE_SCHEMA errors? I am

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-02-29 Thread Jim Callahan
Are you using any SQL VIEWs? "You cannot DELETE, INSERT, or UPDATE a view. Views are read-only in SQLite." http://sqlite.org/lang_createview.html Jim On Mon, Feb 29, 2016 at 10:31 PM, Vince Scafaria wrote: > Richard, I can confirm that having a writable connection open first, prior > to trying

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-02-27 Thread Richard Hipp
On 2/26/16, Vince Scafaria wrote: > I am using System.Data.SQLite in .NET and encountering "database is locked" > with wal using multiple threads from the same process running simple select > statements with (separate) read-only connections. The first database connection (in any process) that

[sqlite] Database is locked (wal) - purely from read-only connections/queries

2016-02-26 Thread Vince Scafaria
I am using System.Data.SQLite in .NET and encountering "database is locked" with wal using multiple threads from the same process running simple select statements with (separate) read-only connections. Please see the link below and note the Visual Studio output window when it runs.