Hello, I am writing a program using SQLite that uses two threads performing the following operations in an infinite loop: - Thread 1 inserts 500 records to the database every 30 seconds and then goes to sleep. (I prepare an insert statement, BEGIN TRANSACTION, bind values, step through the statement, reset the statement, and do END TRANSACTION). - Thread 2 makes one of 10 pre-defined queries to the database every 5 seconds (using sqlite3_get_table()) and then goes to sleep.
This runs ok for some time, but then I get a SQLite error 1 (SQL logic error or missing database). What could be the problem? In one run, I encountered the error: sqlite3_get_table() called with two or more incompatible queries. The same sqlite* database connection is used in both the threads. SQLite is compiled with the -DSQLITE_ALLOW_XTHREAD_CONNECT option; no SQLITE_THREADSAFE compile time option is provided so I guess the threading mode is serialized. Thanks in advance for your help. dbikash -- View this message in context: http://www.nabble.com/%22SQL-logic-error-or-missing-database%22-with-multithreaded-program-tp20266281p20266281.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users