I was reading another site that mentioned that Sqlite busy crashes a TCL proc
instead of returning an error code of 5.  Is this true?

Jim Dodgen replied:

"pretty vague question.

I recommend you supply more details like:

what "other website"

What version of SQLite are they referring to"



Actually I searched and found an example on this in the archives of site here is
the entry.   

Re: [sqlite] Tcl - timeout method

drh
Wed, 16 Aug 2006 10:27:58 -0700

Bud Beacham <[EMAIL PROTECTED]> wrote:
> Yes.  This is a bug, but I have not filed it yet.  The problem is that the 
> the Tcl errorcode command does not return a 5 (SQLITE_BUSY) when the DB is in 
> use.  Instead, Tcl crashes with a "database locked" message.  
>   For example,
>    sqlite dbCmd $dataBase
>  dbCmd timeout 3000
>  set qryResult [dbCmd eval $query]
>  set errorCode [dbCmd errorcode]
>  dbCmd close
>    
>   So this means that instead of checking the errorcode to try again on a 
> locked DB you need to enclose everything in a "catch" statement, and check 
> the "catch" for an error.
>   

The current behavior is by design.  It is as intented.  It is
the "TCL way" to throw an exception when something goes wrong,
and encountering an SQLITE_BUSY error counts as something
going wrong.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to