On May 13, 2008, at 7:57 AM, [EMAIL PROTECTED] wrote:

>
> I‘m running ATTACH database on SQlite 3.5.8 on windows.  
> I‘m opening one database
> file and attaching the second one.
> On my computer it works, but it fails at other computer. The  
> database is opened in more
> than one thread (it is failing in worker thread).
> sqlite3_step() returns SQLITE_MISUSE , but _sqlite3_errmsg() returns  
> "database is locked".
> What can be the problem?

My guess is that SQLITE_MISUSE is being returned when you try to do  
something with a prepared statement that has been finalized or a  
database connection that has been closed.  The error checking to  
detect these things and return SQLITE_MISUSE is probabilistic - it is  
not guaranteed to succeed.  But when it does, it is helpful in finding  
application errors.

SQLITE_MISUSE returns do not set the error message.  So  
sqlite3_errmsg() will continue to return the previous error, whatever  
that was.

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