[Haskell-cafe] Re: HDBC Transactions with Sqlite3

John Goerzen jgoerzen at complete.org
Sun Jan 15 10:38:59 EST 2006

On 2006-01-13, Tom Hawkins <tomahawkins at 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?

Sqlite3 has some restrictions that most (all?) other SQL databases don't

One critical one is that, with a few exceptions, you are not allowed to
have more than one statement open on a given database simultaneously.
This has bitten me a few times as well.

I suspect that you may simply need to call finish on your statement
after you're done with your query.  This would be the most critical on
your updates (INSERT and UPDATE queries).  If you post your code, I
could probably point out specific problems.

-- John

More information about the Haskell-Cafe mailing list