On 8 May 2012, at 9:51pm, "Tilsley, Jerry M." <jmtils...@st-claire.org> wrote:
> This is probably a newbie question so please bear with me. I'm accessing a > SQLite database through TCL and periodically I get a "Database Locked" error. > This is a multi-thread process that writes to the DB, do I need to enable > WAL for this, if so, do I do this from the TCL side or the command-line side? You probably haven't set a timeout, which means that if two threads clash neither backs off to wait for the other to finish. Use this function: <http://sqlite.org/c3ref/busy_timeout.html> to set a non-zero timeout (I suggest five seconds) after the connection is opened, and try again. If you don't have access to that API, look for an equivalent in the API you're using. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users