---------- Initial Header ----------- >From : "Gerhard H�ring" [EMAIL PROTECTED] To : "sqlite-users" [EMAIL PROTECTED] Cc : Date : Fri, 21 Nov 2003 16:43:26 +0100 Subject : Re: [sqlite] database is locked
> [EMAIL PROTECTED] wrote: > > Hi all, > > > > I'm trying SQLite with Zope > > You're using PySQLite, right? right. > > > and it works fine, but when I use the browser's > > [Stop] button to interrupt the request it gives me the message: > > > > "database is locked" [...] > > This happens when you have a connection that is within a transaction (i. > e. you haven't issued .commit() or .rollback() on the connection object, > yet) and you're trying to open a second connection to the same database. I'm trying to read a table, I'm not writting it; My form have a button wich sends the command: SELECT * from table1 if I push it more than once it ...(or if I push another button with a select on other table), the response is: Zope has encountered an error while publishing this resource. Error Type: OperationalError Error Value: database is locked at this point I have to close the database connection and reopen it again. > > The solution is to assure that you always .commit() or .rollback(). I > don't know where to put that in a ZOPE database adapter, perhaps you > should check the sources of a different ZOPE DA. > > But it's hard to tell without knowing your sources and without sufficent > knowledge about Zope database adapters ;-) > > Or are you using PySQLite not from within a DA, but otherwise? Yes, I'm using PySQLite from DA. Jo > > -- Gerhard > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

