HDBC Transactions with Sqlite3
I have HDBC running with Sqlite3, but I'm getting a SqlError due to a locked table. Please excuse my SQL ignorance, but what may be causing the problem? In SQL, are we not allowed to select, update, and delete from a table within a single transaction? If not, what are the rules for transactions? Thanks for any help! -Tom SELECT * FROM freeKey; SELECT * FROM nextKey; INSERT INTO nextKey VALUES (1); SELECT * FROM freeKey; SELECT * FROM nextKey; UPDATE nextKey SET key = 2 WHERE key = 1; SELECT * FROM freeKey; SELECT * FROM nextKey; UPDATE nextKey SET key = 3 WHERE key = 2; INSERT INTO freeKey VALUES (0); INSERT INTO freeKey VALUES (1); SELECT * FROM freeKey; DELETE FROM freeKey WHERE key = 0; SqlError {seState = "", seNativeError = 1, seErrorMsg = "step: database table is locked"}
On 2006-01-14, Tom Hawkins <tomahawkins@gmail.com> wrote:
I have HDBC running with Sqlite3, but I'm getting a SqlError due to a locked table. Please excuse my SQL ignorance, but what may be causing the problem? In SQL, are we not allowed to select, update, and delete from a table within a single transaction? If not, what are the rules for transactions?
See my reply on -cafe at: http://www.haskell.org//pipermail/haskell-cafe/2006-January/013950.html -- John
participants (2)
-
John Goerzen -
Tom Hawkins