Dan wrote:
> On Mar 6, 2009, at 1:48 PM, Marcus Grimm wrote:
> 
>> I just want to add another hint that I learned yesterday:
>>
>> when sqlite3_step() returns SQLITE_LOCKED be aware
>> that sqlite3_reset() will most likely also return
>> SQLITE_LOCKED and thus it is necessary to repeat calling
>> it until it returns SQLITE_OK.
> 
> This is incorrect. If an error is encountered by sqlite3_step() and
> an error code returned, the same error code is returned by the  
> subsequent
> call to sqlite3_reset() or sqlite3_finalize(). sqlite3_reset() returning
> SQLITE_LOCKED does not mean you have to call it again.

Uhh... you are right. Sorry for that.

However: I've checked what sqlite3_reset() returns in this case:
The first attempt returns SQLITE_LOCKED, the 2nd try returns SQLITE_OK.

But it works, as you say, to just call sqlite3_reset() one time and proceed
with sqlite3_step().

> 
>> Maybe it would be agood idea to have these kind of
>> info somewhere bundled in the sqlite docs?
>> I found it sometimes difficult to get such issues
>> extracted or collected from the sqlite pages, resulting
>> in a lot of try and error loops and generating traffic
>> on the mailing list... :-)
> 
> The website could be much improved by including examples. Feel free
> to create a wiki page or two if you have any ideas for them.

Yes, but I don't consider my selve as an expert -- which is true as one can see
from my wrong hint above... :-)

The website is allready excellent, I'm not at all complaining...

Anyway, I've placed an updated version of the thread test program on the
web:

http://www.exomio.de/sqlitethreadtest.c

If somebody found it useful or good enough: Feel free to use it, change it,
or put on wiki pages.

Thanks Dan, once more

Marcus

> 
> Dan.
> 
> _______________________________________________
> 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

Reply via email to