SQLite 64 bit Error lazarus / 16-Databases ---------------------------------------------------------------------- LA.Center · 2012-05-16 07:45 Hi, has anyone come across this problem. Win x64 using SQLite 3.7.x 64 bit, when running a query I get the error message: "library routine called out of sequence" and my connection crashes. Please help. ---------------------------------------------------------------------- ludob · 2012-05-16 08:18 http://sqlite.org/cvstrac/wiki?p=LibraryRoutineCalledOutOfSequence Check if your code is doing any of the points mentioned. Multi- threading is the prime suspect. ---------------------------------------------------------------------- LA.Center · 2012-05-16 08:39 thx ludop, I have two db and used 1 connection, I added a 2nd connection and it worked fine. Now I am thinking that SQLite connection component does not close the connection or does not release the handle to the db and therefor when I closed and switched the db this error occurred.