>>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 3:33 PM, d b <va230...@gmail.com> wrote:

> 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 <va230...@gmail.com> 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 record(10,000 record).
>> I was able to insert the records successfully after restart the application
>> only.
>>
>>
>> On Mon, Mar 31, 2014 at 2:23 PM, d b <va230...@gmail.com> wrote:
>>
>>> 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 reason?
>>>
>>>   steps from application:
>>>
>>>   bool stmt::execute(const char* const insertquery, listofinputparams)
>>>   {
>>>
>>>        insertquery is insert or replace into mystuff(id, name, value)
>>> values(?,?,?);
>>>
>>>        bool r = false;
>>>
>>>       sqlite3_stmt s = find(insertquery);
>>>
>>>        while(enumerate listofinputparams)
>>>        {
>>>            bind each argument for insert statement s
>>>        }
>>>
>>>        sqlite3_step(s);
>>>
>>>        sqlite3_reset(s);
>>>
>>>        return r;
>>>   }
>>>
>>> Thanks,
>>> a v
>>>
>>
>>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to