Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
I tried to get error code 21 by using below code snippet. But didn't get. Skipped sqlite3_reset() for 2 to 10,000 records. code snippet: int main() { //create db connection and statement for(int i = 0; i < 1; ++ i) { MyFunc(i, "abc", "def"); } //finalize

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
>>You might have failed to call sqlite3_reset() Here is the point. If my application gets any error(other than SQLITE_OK) during binding parameters for 11th record, function may return without sqlite3_reset. So, subsequent insertions may result same error. Am I right? On Mon, Mar 31, 2014 at

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread Richard Hipp
On Mon, Mar 31, 2014 at 7:33 AM, d b wrote: > My application calls sqlite3_finalize() after insertion of 10,000 > record(loop). Is there any other reason? > You might have failed to call sqlite3_reset(), or you might have called sqlite3_step() after the previous

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
My application calls sqlite3_finalize() after insertion of 10,000 record(loop). Is there any other reason? On Mon, Mar 31, 2014 at 3:23 PM, d b wrote: > sqlite3_bind_text() returned 21 error. It is throwing for all insertions > once error introduced. > > For ex: Here,

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread Richard Hipp
On Mon, Mar 31, 2014 at 7:23 AM, d b wrote: > sqlite3_bind_text() returned 21 error. It is throwing for all insertions > once error introduced. > > For ex: Here, Inserted first 10 records successfully. then it was started > throwing error 21 for 11th record on-wards till last

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
sqlite3_bind_text() returned 21 error. It is throwing for all insertions once error introduced. For ex: Here, Inserted first 10 records successfully. then it was started throwing error 21 for 11th record on-wards till last record(10,000 record). I was able to insert the records successfully after

Re: [sqlite] sqlite suddenly thrown error

2014-03-31 Thread Clemens Ladisch
d b wrote: > I am getting sqlite error 21. SQLITE_MISUSE > There is only one sqlite prepared statement for insertion. It's not multi > threaded app. The below function repeatedly calling for every record > insertion. This app was running from last 4 days. On third, it was started > throwing

[sqlite] sqlite suddenly thrown error

2014-03-31 Thread d b
Hi, I am getting sqlite error 21. There is only one sqlite prepared statement for insertion. It's not multi threaded app. The below function repeatedly calling for every record insertion. This app was running from last 4 days. On third, it was started throwing error 21. What could be the