Hi Sreekumar, Do you have a db connection shared across threads? This is not advised . Try opening a db connection per thread instead.
-- Tito On Dec 23, 2011, at 15:06, Sreekumar TP <sreekumar...@gmail.com> wrote: > Hi, > > yes, I know. I have a multithreaded app. One db conection.I will try to > reproduce the problem with a simple app. > > However, the difference between the working and non working case is that in > the working case statements are prepared each time. In the non working > case, its reused. > > The very first call to bind throws this error. > > Sreekumar > On Dec 23, 2011 2:51 PM, "Pavel Ivanov" <paiva...@gmail.com> wrote: >> >> Devil is in the details. What you described in general is okay. But I >> guess the exact code you have has some problems. To find them we >> should see the code. >> >> An just some first check: do you have a single-threaded application >> accessing database? >> >> >> Pavel >> >> >> On Fri, Dec 23, 2011 at 3:32 AM, Sreekumar TP <sreekumar...@gmail.com> > wrote: >>> Hi , >>> >>> I have a strange problem. I do the following in sequence - >>> >>> 1. open database >>> 2. set pragmas >>> 3.create table >>> 4. prepare a paremetrised statement ( SELECT ..) >>> 5. bind values to the statement >>> 6. step >>> >>> At 5, I get the error "library routine called out of sequence". >>> >>> If I replace the parameterised statement with a 'non-parameterised' >>> statement, I have no issues. >>> >>> If I use a parameterized INSERT statement , I do not get the error. >>> >>> Any suggestions? >>> >>> -Sreekumar >>> _______________________________________________ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users